mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-10-07 04:34:36 +08:00
Name the tag when a BTags entry is too short to hold an address
A source of fewer than three columns raised E684 from parts[2], which the loop reported in place of the message the line below it gives.
This commit is contained in:
1 file changed
+2
-2
@@ -1712,9 +1712,9 @@ function! s:btags_sink(from, lines)
|
|||||||
for line in a:lines[1:]
|
for line in a:lines[1:]
|
||||||
try
|
try
|
||||||
let parts = split(line, "\t")
|
let parts = split(line, "\t")
|
||||||
let excmd = s:tag_address(parts[2], 0)
|
let excmd = len(parts) > 2 ? s:tag_address(parts[2], 0) : ''
|
||||||
if empty(excmd)
|
if empty(excmd)
|
||||||
throw 'Unsupported tag address: '.s:strip(parts[0])
|
throw 'Unsupported tag address: '.s:strip(get(parts, 0, line))
|
||||||
endif
|
endif
|
||||||
call s:execute_tag_address(excmd)
|
call s:execute_tag_address(excmd)
|
||||||
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
||||||
|
|||||||
Reference in new issue
Block a user