mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-02-25 11:07:28 +08:00
Set jump if the target is in the current file (#1195)
Adding a record to the jump list allows to go back to the cursor position before jump with CTRL-O. Fix #595
This commit is contained in:
@@ -302,6 +302,7 @@ endfunction
|
|||||||
|
|
||||||
function! s:open(cmd, target)
|
function! s:open(cmd, target)
|
||||||
if stridx('edit', a:cmd) == 0 && fnamemodify(a:target, ':p') ==# expand('%:p')
|
if stridx('edit', a:cmd) == 0 && fnamemodify(a:target, ':p') ==# expand('%:p')
|
||||||
|
normal! m'
|
||||||
return
|
return
|
||||||
endif
|
endif
|
||||||
execute a:cmd s:escape(a:target)
|
execute a:cmd s:escape(a:target)
|
||||||
|
|||||||
Reference in New Issue
Block a user