bug-bash
[Top][All Lists]
Advanced

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

Re: Full-width characters can result in an unwanted space in filenames


From: Chet Ramey
Subject: Re: Full-width characters can result in an unwanted space in filenames
Date: Sat, 4 Mar 2017 14:54:06 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.7.1

On 3/4/17 12:53 AM, Misaki wrote:

> 15 Mar 2015
> bash bug
> Full-width character, followed by at least one full word with a space after 
> it.
> 
> Example: あa a
> 
> With trailing space.
> 
> Typing before the full-width character causes the 'あ' to be pushed to next
> line, with a blank space on previous line though if selected and copied it
> will actually produce a space.

This is a display artifact. If there is one physical space left on the
screen line, but the character to be printed occupies more than one space,
bash needs to wrap before the end of the screen line, and it needs to
keep track of that.  It uses a space on the display, but that space doesn't
appear in the readline buffer and the readline movement commands skip over
it.

> 
> The 'あ' occupies two columns on the new line, but characters after the
> first a are only moved one column to the right. The first a, or the first
> character after the 'あ' including a space, is pushed two columns to the
> right, covering the second character after the 'あ'.

I'll take a look at this.

> A similar bug occurs when deleting characters before the 'あ', except no
> trailing space is required. A character is duplicated but might be first
> letter of first word on second line, or last letter of next word.
> Duplicating one letter as soon as 'あ' goes to previous line is easy to
> replicate; duplicating other letters as further characters before 'あ' are
> deleted might only happen after resetting the line using up arrow then down
> arrow, but actually just because of forward bug because displayed
> characters change after pressing up then down. Second word on line only
> seems to be affected if no other words after it.

This, too.

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



reply via email to

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