Júda Ronén
Júda Ronén

Reputation: 294

The linebreak option doesn’t work well in Vim when s, S or c + <cr> are used

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 sshed 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! ☺

Upvotes: 5

Views: 225

Answers (1)

mgiuffrida
mgiuffrida

Reputation: 3579

As per the discussion in the comments, this was indeed a bug, and was patched in 7.4 with patch #576.

Upvotes: 1

Related Questions