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:
magras
2021-10-08 11:26:38 +03:00
committed by GitHub
parent e393108bfa
commit a4ce66d725

View File

@@ -302,6 +302,7 @@ endfunction
function! s:open(cmd, target)
if stridx('edit', a:cmd) == 0 && fnamemodify(a:target, ':p') ==# expand('%:p')
normal! m'
return
endif
execute a:cmd s:escape(a:target)