From 32baf162c04de44fed7a616d37d132d557024f45 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 28 Sep 2026 01:29:04 +0900 Subject: [PATCH] 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. --- autoload/fzf/vim.vim | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index 054ebae..90f7009 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -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)