Skip to content

Commit d3f91c4

Browse files
committed
squash! fixup! fixup! Import smart_auto_mappings: use a timer if available
Only start completion with `g:jedi#completions_enabled`. TODO: doc
1 parent 585cd35 commit d3f91c4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

autoload/jedi.vim

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -594,7 +594,10 @@ function! jedi#smart_auto_mappings(...) abort
594594
\ && mode() ==# 'i'
595595
\ && s:import_timer[2][1:2] == [pos[1], pos[2]-1]
596596
" Enter characters and start completion.
597-
call feedkeys("import \<C-x>\<C-o>\<C-r>=jedi#complete_opened(1)\<CR>", 'nt')
597+
call feedkeys('import ', 'nt')
598+
if g:jedi#completions_enabled
599+
call feedkeys("\<C-x>\<C-o>\<C-r>=jedi#complete_opened(2)\<CR>", 'nt')
600+
endif
598601
endif
599602
return
600603
elseif search('\m^\s*from\s\+[A-Za-z0-9._]\{1,50}\%#\s*$', 'bcn', line('.'))

0 commit comments

Comments
 (0)