mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-09-30 07:32:23 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user