[Tags] Workaround for last-position-jump (#810)

If there's an autocmd for BufReadPost that jumps to the last position,
searching for the tag location sometimes results in vim printing the
wrapscan warning and then requires hit-enter. Execute the search
silently to suppress the warning (errors are still visible!).
This commit is contained in:
Tomáš Janoušek
2019-05-14 11:46:01 +02:00
committed by Junegunn Choi
parent ac4e7bfb36
commit 5c87ab86c0

View File

@@ -803,7 +803,7 @@ function! s:tags_sink(lines)
let relpath = parts[1][:-2]
let abspath = relpath =~ (s:is_win ? '^[A-Z]:\' : '^/') ? relpath : join([base, relpath], '/')
call s:open(cmd, expand(abspath, 1))
execute excmd
silent execute excmd
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
catch /^Vim:Interrupt$/
break