[Top][All Lists]

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

[patch] multibyte characters corrupt history display

From: Tim Waugh
Subject: [patch] multibyte characters corrupt history display
Date: Wed, 5 Feb 2003 17:05:33 +0000
User-agent: Mutt/1.4i

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include
-I./lib -D_GNU_SOURCE  -O2 -march=i386 -mcpu=i686 -g
uname output: Linux meme.surrey.redhat.com 2.4.20-2.28 #1 Wed Jan 29
07:50:20 EST 2003 i686 i686 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

        When moving through the history, if the new line has more
        but fewer bytes, the display is corrupted.

        Type #, then two euro signs (for example), then enter.
        Type 'echo', then enter.
        Up-arrow twice, then down-arrow.
        Moving from the line containing the three glyphs (from seven
        bytes) to the line containing four glyphs in four bytes causes
        bad output.


--- bash-2.05b/lib/readline/display.c.display   2003-02-05 16:37:03.000000000 
+++ bash-2.05b/lib/readline/display.c   2003-02-05 16:44:51.000000000 +0000
@@ -1324,7 +1324,7 @@
              insert_some_chars (nfd, lendiff, col_lendiff);
              _rl_last_c_pos += col_lendiff;
-         else if (*ols == 0)
+         else if (*ols == 0 && lendiff > 0)
              /* At the end of a line the characters do not have to
                 be "inserted".  They can just be placed on the screen. */

reply via email to

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