From 81afa1b9d92090b9553b0ed620fe7b3cd77fc639 Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Mon, 28 Sep 2026 04:24:49 +0900 Subject: [PATCH] Take the carriage return off a tag address A tags file with CRLF endings and no ';"' terminator, as 'ctags --format=1' writes on Windows, left a stray CR on the address, and s:strip() counts only spaces and tabs. Every entry in such a file was refused. --- autoload/fzf/vim.vim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/autoload/fzf/vim.vim b/autoload/fzf/vim.vim index ff7facf..de0c1b8 100755 --- a/autoload/fzf/vim.vim +++ b/autoload/fzf/vim.vim @@ -563,8 +563,9 @@ endfunction let s:tag_address_part = '\%(\d\+\|/\%(\\.\|[^/\\]\)*/\|?\%(\\.\|[^?\\]\)*?\)' let s:tag_address_open = '\%(/\%(\\.\|[^/\\]\)*\|?\%(\\.\|[^?\\]\)*\)' function! s:tag_address(rest, whole) - " :BTags aligns its columns, so its field arrives padded - let rest = s:strip(a:rest) + " :BTags aligns its columns, so its field arrives padded, and a tags file with + " CRLF endings leaves a carriage return, which s:strip() keeps + let rest = substitute(a:rest, '^[ \t\r]*\|[ \t\r]*$', '', 'g') let chain = '^'.s:tag_address_part.'\%(;'.s:tag_address_part.'\)*' let address = matchstr(rest, chain.'\ze\%(;"\|$\)') if !empty(address)