From 319f5ac437da2920c87a135cb8b95716e20e554f Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 28 Sep 2026 05:33:53 +0900 Subject: [PATCH] Rewrite the tabs of an address only where it ends in ';"' Without the terminator nothing says which tab belongs to the pattern and which separates a column, so a tag command that adds columns without one had its address merged with them and refused. --- autoload/fzf/vim.vim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 07575a5..c52a05d 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -1655,9 +1655,11 @@ endfunction " ------------------------------------------------------------------ " ctags leaves a tab inside a pattern as it found it, and splitting the line on " tabs would cut the address short, leaving a fragment that matches some other -" line. '\t' matches the same text and keeps the field the line's third +" line. '\t' matches the same text and keeps the field the line's third. Only the +" ';"' 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.\{-}\ze;"\t', \ '\=substitute(submatch(0), "\t", ''\\t'', "g")', '') endfunction