mirror of
https://github.com/junegunn/fzf.vim.git
synced 2025-12-06 04:34:26 +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
|
||||
if !a:0
|
||||
if !edit
|
||||
normal! m'
|
||||
call setpos("''", getpos('.'))
|
||||
silent! call s:execute_silent(cmd)
|
||||
endif
|
||||
else
|
||||
@@ -378,7 +378,7 @@ function! s:action_for(key, ...)
|
||||
" instructed to stay on the current buffer.
|
||||
let stay = edit && (a:0 > 1 && a:2 || fnamemodify(a:1, ':p') ==# expand('%:p'))
|
||||
if !stay
|
||||
normal! m'
|
||||
call setpos("''", getpos('.'))
|
||||
call s:execute_silent((len(cmd) ? cmd : 'edit').' '.s:escape(a:1))
|
||||
endif
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user