Skip to content

Bug: Tagbar seems to be "one tag too late" when updating statusline #855

@charleshwankong

Description

@charleshwankong

I use the following mappings to perform navigation in the bug demo below.

nnoremap <space> /^    p.*(.*<CR>:nohl<CR><ESC>
nnoremap <leader><space> ?^    p.*(.*<CR>:nohl<CR><ESC>
2023-08-08.at.12.35.55.AM.mov

Expected behavior is that upon each jump performed, the statusline should be updated to display the function name arrived at.

Actual behavior is seen in the screenshot. My interpretation of it is that expected behavior occurs about only 10% of the time. 90% of the time, the statusline displays the prior function rather than the current function.

Other details.

  1. Any time the statusline is late, any movement within the function (in the screenshot, I use '$' to go to end of line, or use which is just a trivial mapping I have to run nohighlight.) will update the statusline to the correct value 100% of the time.
  2. I don't believe this is a latency issue as some other issues have been suggesting, because tagbar responds quickly to the jumps in the screenshot. The "delay" is instead in what function tagbar thinks it's currently in.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions