Closed BenoitDuffez closed 4 years ago
This is tricky to solve. With the information that ctags provides Tagbar can't really know that it is "inside" a function, it can only know what the nearest tag above the cursor is. You would also need some kind of precedence between tag types to define which should be preferred in cases like these. I'll think about what the best thing to do here would be.
This simple code can reproduce the issue on 01f57ac5 (vim 7.4, ctags 5.9~svn20110310,):
Place the cursor on the
return
statement and open tag bar. It show the current context as inNOTWORKING
macro, instead of themain
function.See this example:
While if the cursor is above the macro, it's working as expected: