I’ve noticed a weird behaviour of (g)Vim: say I have a window with a line longer than its width and I’ve set wrap linebreak cursorline
, if I hit s, S, cmotion
or cc (but not i, a o or O) on another line and then hit ↵, lines on this window are for some mysterious cause no longer wrapped at word boundaries (it looks as if I’ve set wrap nolinebreak
). If I hit Esc and then j or k it returns to normal display.
This should obviously not occur. Is it a bug in Vim or something I did wrong? It occurs when invoking Vim tabula rasa (vim --noplugins -u NONE
or gvim --noplugins -u NONE
) as well. My machine is Arch Linux, and the Vim version I use is 7.4.537. I’ve tested it on another Arch Linux machine I have and it behaves the same, but when I ssh
ed my DreamHost account, on which Vim 7.3.429 is installed, it behaves as it should.
Note: it doesn’t occur without cursorline
on another line, so I guess it’s connected somehow, but I’m not really sure how. It occurs anyway if edit using s or cj on the same long line (than it affects only this line).
Can you confirm or disconfirm this erroneous behaviour occurs on your machine? How can one fix this?
(If it isn’t only me and it is a bug, I’ll send a bug report).
Thank you very much! ☺
As per the discussion in the comments, this was indeed a bug, and was patched in 7.4 with patch #576.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With