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

There is some delay before jump to a corect tag #2

Closed
Mishail opened this issue Feb 28, 2011 · 5 comments
Closed

There is some delay before jump to a corect tag #2

Mishail opened this issue Feb 28, 2011 · 5 comments
Labels

Comments

@Mishail
Copy link

Mishail commented Feb 28, 2011

https://dl.dropbox.com/u/1296492/bug.swf (~ 4MB, sorry for the quality)

Please take a look at the attached video and take note of the cursor position.
as you may see, when I dobleclick in the Tagbar window the cursor moves to the position near the tag, and then afters several "blinks" of the cursor, it moves to the correct tag

@majutsushi
Copy link
Collaborator

That's strange, I can't really see how that could happen with Tagbar's code. What's your Vim version? What is 'updatetime' set to? Also, could you try the following things:

  • What happens when you do :execute <linenumber> with an arbitrary line number that's not currently shown in the window?
  • Does anything change when you replace the line
    execute taginfo.fields.line
    in s:JumpToTag() (line 1659) with
    execute 'normal ' . taginfo.fields.line . 'G'
  • Does anything change when you comment out the line
    call s:HighlightTag(s:current_file)
    in the same function?

@majutsushi
Copy link
Collaborator

I just thought of something: try inserting a line with just redraw in it after the normal! z. line in s:JumpToTag().

@Mishail
Copy link
Author

Mishail commented Mar 2, 2011

My vim is 7.3.98 and updatetime == 4000.
I've tried the steps proposed in your 1st comment, and here are results:

  • :execute <linenumber> immediately switches to the given line (even if that's not shown in the window)
  • Chages in the s:JumpToTag() (line 1659) don't help
  • But commenting the call s:HighlightTag(s:current_file) seems solves the issue.

@Mishail
Copy link
Author

Mishail commented Mar 2, 2011

Well, ading redraw and uncommenting call s:HighlightTag(s:current_file) seems to be working too

@majutsushi
Copy link
Collaborator

Interesting, in some cases Vim doesn't seem to redraw automatically after moving the cursor. I've added redraw to a few places now, so the problem should hopefully be fixed.

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

No branches or pull requests

2 participants