kimbavel / vim

Automatically exported from code.google.com/p/vim
0 stars 0 forks source link

Vim hangs with matchadd('...', '\%78v') and nowrap on large/long lines #310

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. wget 
https://gist.githubusercontent.com/blueyed/b098ff662b2963621ec0/raw/a6f5a88f43c3
f55a48bf89ddcad08c86ed2e67c9/test.diff
2. vim -u NONE -N test.diff
3. :set nowrap
3. :call matchadd('ColorColumn', '\%78v', 100)

What is the expected output? What do you see instead?

The virtual column 78 should get highlighted.

Instead, Vim hangs and has to be killed with signal 9.

What version of the product are you using? On what operating system?

7.4.560 (hg)

Original issue reported on code.google.com by dhahler@gmail.com on 6 Jan 2015 at 7:46

GoogleCodeExporter commented 9 years ago
can you try :set re=2?

Original comment by chrisbr...@googlemail.com on 8 Jan 2015 at 10:58

GoogleCodeExporter commented 9 years ago
Here is a patch, that mitigates the problem, by preventing matches impossible 
matches.

Original comment by chrisbr...@googlemail.com on 8 Jan 2015 at 11:16

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks!

`:set re=2` did not appear to help, but the patch improves the behaviour.

It still takes ~2 seconds though to add the match.

Original comment by dhahler@gmail.com on 9 Jan 2015 at 10:58

GoogleCodeExporter commented 9 years ago
Sorry, I meant re=1 as this is actually the old engine. Can you test with that 
one?

Original comment by chrisbr...@googlemail.com on 10 Jan 2015 at 12:14

GoogleCodeExporter commented 9 years ago
That patch is wrong. Please use this new patch

Original comment by chrisbr...@googlemail.com on 13 Jan 2015 at 9:14

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by chrisbr...@googlemail.com on 13 Jan 2015 at 9:14

GoogleCodeExporter commented 9 years ago
Patch included as  7.4.577

Original comment by brammool...@gmail.com on 14 Jan 2015 at 5:38