bug-bash
[Top][All Lists]
Advanced

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

Re: [readline] Multibyte invisible chars cause weird prompt length calcu


From: Chet Ramey
Subject: Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue
Date: Tue, 3 Dec 2019 14:21:49 -0800
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.9.1

On 12/3/19 1:43 PM, Алексей Шилин wrote:
> PS1='\[\e]0;тестоваястрока\a\]test prompt\$ '

This is really the problem: the invisible multibyte characters in the
prompt are not correctly counted in all cases and throw off the cursor
positioning calculations. That problem is worse when the prompt
completely changes, like it does when cleaning up from an incremental
search, since we don't have enough state about the prompt that's
visible (in this case, the reverse-i-search prompt). The fix is the
same as the previous problem, though there are a couple of other things
to fix up.

Chet

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



reply via email to

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