Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
charleshwankong opened this issue Aug 8, 2023 · 1 comment

Comments

@charleshwankong
Copy link

charleshwankong commented Aug 8, 2023

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.
@raven42
Copy link
Collaborator

raven42 commented Aug 8, 2023

Can you share your vimrc configuration? I'm trying to reproduce and for me it updates almost instantaneously.

tagbar-jump-to-tag

One possibility is if you have your updatetime in vim set too high. By default I believe this is 4000 (4 seconds). Can you try setting this to 500 and see if you see a change in behavior?

Add the following in your .vimrc

set updatetime=500

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants