mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-01-30 14:45:30 +08:00
[fzf#vim#complete] Keep insert mode after completion
https://github.com/junegunn/fzf.vim/issues/303#issuecomment-755965141 Fix a bug where completion ends in normal mode instead of in insert mode when a terminal buffer is used to render fzf in regular Vim (layout != down).
This commit is contained in:
@@ -1345,11 +1345,16 @@ function! s:complete_insert(lines)
|
|||||||
let &ve = ve
|
let &ve = ve
|
||||||
if mode() =~ 't'
|
if mode() =~ 't'
|
||||||
call feedkeys('a', 'n')
|
call feedkeys('a', 'n')
|
||||||
else
|
elseif has('nvim')
|
||||||
execute "normal! \<esc>la"
|
execute "normal! \<esc>la"
|
||||||
|
else
|
||||||
|
call feedkeys("\<Plug>(-fzf-complete-finish)")
|
||||||
endif
|
endif
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
|
nnoremap <silent> <Plug>(-fzf-complete-finish) a
|
||||||
|
inoremap <silent> <Plug>(-fzf-complete-finish) <c-o>l
|
||||||
|
|
||||||
function! s:eval(dict, key, arg)
|
function! s:eval(dict, key, arg)
|
||||||
if has_key(a:dict, a:key) && type(a:dict[a:key]) == s:TYPE.funcref
|
if has_key(a:dict, a:key) && type(a:dict[a:key]) == s:TYPE.funcref
|
||||||
let ret = copy(a:dict)
|
let ret = copy(a:dict)
|
||||||
|
|||||||
Reference in New Issue
Block a user