bug-bash
[Top][All Lists]
Advanced

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

Re: readline display bug with UTF-8 and char insertion


From: Chet Ramey
Subject: Re: readline display bug with UTF-8 and char insertion
Date: Sun, 17 Feb 2013 16:40:23 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/17.0 Thunderbird/17.0

On 1/21/13 3:16 PM, Egmont Koblinger wrote:
> Hi,
> 
> On a fully UTF-8 environment, in certain easily reproducible cases, the
> command line becomes messed up (the cursor ends up in the wrong column, and
> from then on it's tons of cumulative mistakes).  I'm using bash-4.2.42, but
> the bug also affects other readline-based applications.
> 
> To reproduce:  Save the attached file as your .bash_history.  (Notice the
> UTF-8 accented characters in the middle line.  Also notice the trailing
> space in each line.)  Use either the Up arrow, or enter a common prefix of
> the lines and press a hotkey bound to history-search-backward.  You'll see
> the command line getting messed up.

Thanks for the report.  This is a great job of investigating, and your
patch is pretty much right on.  Openining up space and then writing over
it is clearly the right way to go.  The only issue is what to do when a
terminal has insert mode (im/ei) but not insert-char (IC/ic): you have
to insert the spaces yourself and then back up over them.  Mac OS X
Terminal is such a terminal, for example.

Thanks again for the patch.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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