forked from VimPlug/jedi-vim
completion tests
This commit is contained in:
@@ -187,6 +187,7 @@ function! jedi#complete_string(is_popup_on_dot)
|
|||||||
end
|
end
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
|
||||||
function! jedi#complete_opened()
|
function! jedi#complete_opened()
|
||||||
if pumvisible() && g:jedi#popup_select_first && stridx(&completeopt, 'longest') > -1
|
if pumvisible() && g:jedi#popup_select_first && stridx(&completeopt, 'longest') > -1
|
||||||
" only go down if it is visible, user-enabled and the longest option is set
|
" only go down if it is visible, user-enabled and the longest option is set
|
||||||
|
|||||||
@@ -32,8 +32,20 @@ describe 'completions'
|
|||||||
end
|
end
|
||||||
|
|
||||||
it 'cycling through entries'
|
it 'cycling through entries'
|
||||||
|
" testing select_first doesn't seem to work in ex mode
|
||||||
execute "normal oraise impX\<C-n>\<C-n>\<C-n>"
|
execute "normal oraise impX\<C-n>\<C-n>\<C-n>"
|
||||||
Expect getline('.') == 'raise ImportWarning'
|
Expect getline('.') == 'raise ImportWarning'
|
||||||
|
let g:jedi#popup_select_first = 0
|
||||||
|
execute "normal oraise impX\<C-n>\<C-n>\<C-n>"
|
||||||
|
Expect getline('.') == 'raise ImportWarning'
|
||||||
|
let g:jedi#popup_select_first = 1
|
||||||
|
|
||||||
|
" -longest completes the first one
|
||||||
|
set completeopt -=longest
|
||||||
|
execute "normal oraise baseX"
|
||||||
|
Expect getline('.') == 'raise BaseException'
|
||||||
|
set completeopt +=longest
|
||||||
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user