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:
Junegunn Choi
2026-09-28 04:01:19 +09:00
parent 0ce4cca7bd
commit 74cab39bbf
+2 -2
View File
@@ -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('.')})