Say what a lone address fragment does

The comment read as if every fragment were dropped. One with nothing before it
cannot be told apart from a helptags address, so it goes through as is.
This commit is contained in:
Junegunn Choi
2026-09-28 01:29:04 +09:00
parent 5ad2fa7bed
commit 32baf162c0
+5 -4
View File
@@ -554,10 +554,11 @@ endfunction
" then not run.
"
" A pattern holding a tab reaches :BTags cut short, since it reads the field on
" its own. Such a fragment matches the wrong line, so keep only the parts before
" it, and accept an unterminated pattern alone, which is the whole address in a
" helptags file. Running to the end of the line, it takes any '|' or ';' with it,
" so it cannot chain a command either.
" its own. Where earlier parts parsed, keep those and drop the fragment, since a
" line number beats half a pattern. A fragment on its own is indistinguishable
" from a helptags address such as '/*:Ag*', so it goes through unterminated, the
" way a builtin tag jump takes the same field. Running to the end of the line, it
" takes any '|' or ';' with it, so it cannot chain a command either.
let s:tag_address_part = '\%(\d\+\|/\%(\\.\|[^/\\]\)*/\|?\%(\\.\|[^?\\]\)*?\)'
let s:tag_address_open = '\%(/\%(\\.\|[^/\\]\)*\|?\%(\\.\|[^?\\]\)*\)'
function! s:tag_address(rest)