[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] display bug in multi-line command when a utf-8 is shifted to nex

From: Egmont Koblinger
Subject: [PATCH] display bug in multi-line command when a utf-8 is shifted to next line
Date: Tue, 29 Jan 2013 14:06:05 +0100


In UTF-8 environment, with bash-4.2.42, type a command that takes up at
least 3 lines, and contains an accented (UTF-8) letter in the first line.
Move the cursor to the beginning, and insert more characters.

Just when the UTF-8 accented letter is pushed down to the second line, the
last line becomes displayed incorrectly: its last letter is doubled.  Same
when you delete chars so that the accented one jumps back to the previous

Updating the last line uses the macro VIS_LLEN to determine the length of
that line in the 'old' buffer, which in turn accesses the vis_lbreaks array
up to the index ind_botlin+1.  When the UTF-8 character overflows, the
'old' buffer is modified and vis_lbreaks is supposed to be adjusted
correctly, however, due to the premature end of the loop this last value is
not updated.

Please apply the attached trivial patch to fix the problem.


Attachment: bash-4.2.42-last-line-misdrawn-after-char-insertion.patch
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]