Skip to content
This repository has been archived by the owner on Sep 20, 2023. It is now read-only.

Syntatic calling redraw! can cause Vim to crash #834

Closed
Valloric opened this issue Oct 29, 2013 · 8 comments
Closed

Syntatic calling redraw! can cause Vim to crash #834

Valloric opened this issue Oct 29, 2013 · 8 comments

Comments

@Valloric
Copy link
Contributor

Short version:

It seems that if Syntastic (or anything really) calls redraw while Vim's pop-up menu is shown, Vim crashes. This is caused by a bug in Vim and a patch for the bug is waiting to land, but it would be great to work around this to support people who aren't running the very latest Vim.

Adding a condition to the s:Redraw function that checks for output of pumvisible() and doesn't redraw if the pop-up menu is shown should fix this.

Long version:

Here's the relevant comment: ycm-core/YouCompleteMe#618 (comment)

The issue that started everything: ycm-core/YouCompleteMe#593

@lcd047
Copy link
Collaborator

lcd047 commented Oct 29, 2013

Ok, f623d1e (in a branch delayed_redraws) adds a variable g:syntastic_delayed_redraws, off by default. When this variable is turned on, redraws are moved to a CursorHold / CursorHoldI handler. Please let me know if this works.

@oblitum
Copy link

oblitum commented Oct 29, 2013

@lcd047 @Valloric yep, checking out the branch and setting the variable stopped triggering the segmentation fault, while still providing diagnostics.

@oblitum
Copy link

oblitum commented Oct 29, 2013

this is better be the default in master when merged I think.

@lcd047
Copy link
Collaborator

lcd047 commented Oct 29, 2013

@oblitum It's a hack, and not everybody needs it. Also, Vim crashing is an incentive for people to upgrade. :)

@oblitum
Copy link

oblitum commented Oct 29, 2013

@lcd047 hehe, true =)

@Valloric
Copy link
Contributor Author

@lcd047 Thank you so much! May I ask when will this be merged into master? I'd like to start telling users to update to latest Syntastic to work around the issue.

Just FYI, I'll set this flag to true when YCM is loaded.

@lcd047
Copy link
Collaborator

lcd047 commented Oct 29, 2013

I was going to test it for a few more days, but ok, I suppose people having problem with it will complain. Merged in bcbcb7c.

@Valloric
Copy link
Contributor Author

Thanks!

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

No branches or pull requests

3 participants