mirror of
https://github.com/gryf/tagbar.git
synced 2026-10-06 21:50:36 +02:00
Return pattern for prototype if linenr is not available, closes #219
This commit is contained in:
1 parent
4e5e0ebe59
commit
76f16f891b
1 file changed
+5
@@ -1394,6 +1394,11 @@ function! s:NormalTag.getPrototype(short) abort dict
|
||||
else
|
||||
let bufnr = self.fileinfo.bufnr
|
||||
|
||||
if self.fields.line == 0
|
||||
" No linenumber available, try the pattern instead
|
||||
return substitute(self.pattern, '^\\V\\^\\C\s*\(.*\)\\$$', '\1', '')
|
||||
endif
|
||||
|
||||
let line = getbufline(bufnr, self.fields.line)[0]
|
||||
let list = split(line, '\zs')
|
||||
|
||||
|
||||
Reference in new issue
Block a user