[bug] Incorrect display of wrapped lines after normal "s"

71 views
Skip to first unread message

Vlad Irnov

unread,
Nov 11, 2014, 10:22:06 PM11/11/14
to vim...@googlegroups.com
I have encountered a bug when long wrapped lines are briefly displayed
incorrectly after normal command "s". To reproduce:
1) Open attached .txt file:
gvim -u NONE -N s-wrapped-line-display-bug.txt
2) Set the following options, the long line with aaaa's should be wrapped:
:set wrap linebreak cul cuc
3) Place the cursor on line with bbbb and press "s". The results
before and after are in the attached .png screenshot. The display of
the long wrapped line changes unexpectedly from 'linebreak' to
'nolinebreak'. The cursor position is also wrong, as seen in the
screenshot, but this does not always happen.

Setting 'showbreak' may also have the same affect as setting cul
and/or cuc, but I am not sure about that.

Tested Vim versions: the most recent gvim 7.4.507, source downloaded
2014-11-11, compiled on Windows; gvim 7.4.488 on Linux (Debian Live
7.6, vim-gtk installed from backports).
Vim 7.4.256 on Windows is not affected.

Regards,
Vlad
s-wrapped-line-display-bug.txt
s-wrapped-line-display-bug.png

Christian Brabandt

unread,
Nov 12, 2014, 3:35:56 AM11/12/14
to vim...@googlegroups.com
This is probably caused by 7.4.435 which tries to fix
an formatting error caused by the linebreak setting.

I'll look into this. Perhaps one can reset the linebreak setting
earlier.

Best,
Christian

Christian Brabandt

unread,
Nov 12, 2014, 1:58:53 PM11/12/14
to vim...@googlegroups.com
It's actually patch 7.4.467 that causes this.

Here is a patch that resets the linebreak setting in a few more places
in do_pending_operator so that whenever for the change, replace and
insert/append operations, linebreak will be set to its original value
(while still keeping the fix for 7.4.467).

That should also prevent the redrawing issues, that caused the cursor
position to be wrong.

Best,
Christian
--
F: Woran erkennt man, daß ein Politiker lügt?
A: Wenn sich seine Lippen bewegen.
linebreak_bug.diff

Roland Eggner

unread,
Nov 18, 2014, 6:24:07 AM11/18/14
to vim...@googlegroups.com
Hi Christian!
Noted this bug too.
Thanks to Vlad for reporting earlier than I could.
Thanks to you for the patch, it fixes the bug for me. :)


--
Roland Eggner
Reply all
Reply to author
Forward
0 new messages