From bbe5cacb28c670f0596cbd0be8a7a43c61f25da4 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 28 Sep 2026 06:04:49 +0900 Subject: [PATCH] Find the ';"' that ends an address by reading the address Taking the first ';"' before a tab could land inside the pattern: a line holding ';"' followed by a tab, such as a comment, cut the address there and left the real tab unescaped, so the entry was refused. --- autoload/fzf/vim.vim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 38d9650..84590b9 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -547,7 +547,6 @@ function! s:sandboxed(cmd) return 'sandbox execute '.string(a:cmd) endfunction - " Address of a tag, given the rest of the line after the file name, or, with " 'whole' off, the address field alone as :BTags reads it. Only the forms a tags " file is meant to hold, a line number and a search pattern, chained with ';' for @@ -1659,7 +1658,8 @@ endfunction " ';"' terminator says where the address ends, so a line without one is left as " it is rather than guessed at function! s:tabs_in_address(line) - return substitute(a:line, '^\%([^\t]*\t\)\{2}\zs.\{-}\ze;"\t', + return substitute(a:line, '^\%([^\t]*\t\)\{2}\zs'.s:tag_address_part + \ .'\%(;'.s:tag_address_part.'\)*\ze;"\t', \ '\=substitute(submatch(0), "\t", ''\\t'', "g")', '') endfunction