Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15694

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

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue
Date 2019-12-03 14:21 -0800
Organization ITS, Case Western Reserve University
Message-ID <mailman.216.1575411746.1979.bug-bash@gnu.org> (permalink)
References (3 earlier) <f7cb9c63-1eeb-89c0-2bb7-439794075279@case.edu> <f2e0255652f53d22135229ed61f27cca00a312fe.camel@mail.ru> <2f0b7923-3b8b-f16c-f35f-f4c8c6782161@case.edu> <855d321fac7116e8eaa7561ea30b0ac5a309df94.camel@mail.ru> <4bb5652d-e438-25fc-2577-44b7203f84d1@case.edu>

Show all headers | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue Chet Ramey <chet.ramey@case.edu> - 2019-12-03 14:21 -0800

csiph-web