mirror of
https://github.com/junegunn/fzf.vim.git
synced 2026-09-30 07:32:23 +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:
@@ -1712,9 +1712,9 @@ function! s:btags_sink(from, lines)
|
||||
for line in a:lines[1:]
|
||||
try
|
||||
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)
|
||||
throw 'Unsupported tag address: '.s:strip(parts[0])
|
||||
throw 'Unsupported tag address: '.s:strip(get(parts, 0, line))
|
||||
endif
|
||||
call s:execute_tag_address(excmd)
|
||||
call add(qfl, {'filename': expand('%'), 'lnum': line('.'), 'text': getline('.')})
|
||||
|
||||
Reference in New Issue
Block a user