From 66ed2e1458f6f8f9d42c6aa556e802ecf90a775a Mon Sep 17 00:00:00 2001 From: 0rtz <46892933+0rtz@users.noreply.github.com> Date: Tue, 31 Oct 2023 18:08:05 +0300 Subject: [PATCH] Fix jumping to anchor For some reason `execute '/'.l:anchor` does not populate jumplist, so use builtin vim `search()` function --- ftplugin/markdown.vim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ftplugin/markdown.vim b/ftplugin/markdown.vim index fc3fa4d9..3a4c1ad6 100644 --- a/ftplugin/markdown.vim +++ b/ftplugin/markdown.vim @@ -719,7 +719,7 @@ if !exists('*s:EditUrlUnderCursor') execute l:editmethod l:url endif if l:anchor !=# '' - silent! execute '/'.l:anchor + call search(l:anchor, 's') endif else execute l:editmethod . ' '