Skip to content

Commit 0346a03

Browse files
committed
Fix rope.
1 parent d2b32a6 commit 0346a03

File tree

3 files changed

+7
-1
lines changed

3 files changed

+7
-1
lines changed

ftplugin/python/pymode.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ if g:pymode_lint
7676
au! pymode CursorMoved <buffer> call pymode#lint#show_errormessage()
7777
endif
7878

79+
" Disabled for current release
7980
if g:pymode_lint_async
8081
" let &l:updatetime = g:pymode_lint_async_updatetime
8182
" au! pymode BufEnter <buffer> call pymode#lint#start()

pymode/rope.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -774,6 +774,7 @@ def _get_autoimport_proposals(out, ctx, source, offset, dot=False):
774774
return out
775775

776776

777+
@catch_and_print_exceptions
777778
def complete_check():
778779
""" Function description. """
779780

@@ -805,8 +806,12 @@ def complete_check():
805806
if module:
806807
_insert_import(name, module, ctx, source)
807808

809+
vim.command('call pymode#save()')
810+
regenerate()
811+
808812

809813
def _insert_import(name, module, ctx, source):
810814
linenum = int(ctx.importer.find_insertion_line(source))
811815
line = 'from %s import %s' % (module, name)
812816
vim.current.buffer[linenum - 1:linenum - 1] = [line]
817+
vim.current.buffer[linenum:linenum] = ['']

pymode/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def pymode_confirm(yes=True, msg='Do the changes:'):
3535
"""
3636
default = 'yes' if yes else 'no'
3737
action = pymode_input(msg, default)
38-
return 'yes'.startswith(action)
38+
return action and 'yes'.startswith(action)
3939

4040

4141
def pymode_inputlist(msg, opts):

0 commit comments

Comments
 (0)