From 889feae117f1f32428477065df9188c7db2168b2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Tue, 18 Aug 2015 10:28:27 +0200 Subject: [PATCH] jedi#smart_auto_mappings: always 'popup_on_dot' `popup_on_dot=1` means that it should not auto-select the first entry, which is the case for the new smart-import-mapping. --- autoload/jedi.vim | 4 ++-- ftplugin/python/jedi.vim | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/autoload/jedi.vim b/autoload/jedi.vim index affc590..db750ab 100644 --- a/autoload/jedi.vim +++ b/autoload/jedi.vim @@ -423,11 +423,11 @@ function! jedi#complete_opened(is_popup_on_dot) endfunction -function! jedi#smart_auto_mappings(is_popup_on_dot) +function! jedi#smart_auto_mappings() " Auto put import statement after from module.name and complete if search('\import \\\=jedi#complete_opened(".a:is_popup_on_dot.")\" + return "\import \\\=jedi#complete_opened(1)\" endif return "\" endfunction diff --git a/ftplugin/python/jedi.vim b/ftplugin/python/jedi.vim index 4cc811a..26f26ee 100644 --- a/ftplugin/python/jedi.vim +++ b/ftplugin/python/jedi.vim @@ -38,7 +38,7 @@ if g:jedi#auto_initialization endif if g:jedi#smart_auto_mappings == 1 - inoremap jedi#smart_auto_mappings(g:jedi#popup_on_dot) + inoremap jedi#smart_auto_mappings() end if g:jedi#auto_close_doc