mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-10 06:21:54 +08:00
Add workaround for normal! bug in nvim terminals (#1588)
There's a known issue regarding `normal` usage in neovim. See https://github.com/neovim/neovim/issues/4895 for more details. As a temporary workaround, use setpos to set the bookmark instead.
This commit is contained in:
@@ -369,7 +369,7 @@ function! s:action_for(key, ...)
|
|||||||
" errors. e.g. E471: Argument required: tab drop
|
" errors. e.g. E471: Argument required: tab drop
|
||||||
if !a:0
|
if !a:0
|
||||||
if !edit
|
if !edit
|
||||||
normal! m'
|
call setpos("''", getpos('.'))
|
||||||
silent! call s:execute_silent(cmd)
|
silent! call s:execute_silent(cmd)
|
||||||
endif
|
endif
|
||||||
else
|
else
|
||||||
@@ -378,7 +378,7 @@ function! s:action_for(key, ...)
|
|||||||
" instructed to stay on the current buffer.
|
" instructed to stay on the current buffer.
|
||||||
let stay = edit && (a:0 > 1 && a:2 || fnamemodify(a:1, ':p') ==# expand('%:p'))
|
let stay = edit && (a:0 > 1 && a:2 || fnamemodify(a:1, ':p') ==# expand('%:p'))
|
||||||
if !stay
|
if !stay
|
||||||
normal! m'
|
call setpos("''", getpos('.'))
|
||||||
call s:execute_silent((len(cmd) ? cmd : 'edit').' '.s:escape(a:1))
|
call s:execute_silent((len(cmd) ? cmd : 'edit').' '.s:escape(a:1))
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|||||||
Reference in New Issue
Block a user