Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue
В Ср, 27/11/2019 в 20:29 -0500, Chet Ramey пишет: > I poked around enough and found the cause. There will be a > fix in the next devel branch push. The first issue with the line not being cleared is indeed fixed. Thanks! The second one with incorrect history entry output position after e.g. End is pressed is unfortunately still there: test@sid-bash:~$ echo $0 /usr/local/bin/bash test@sid-bash:~$ PS1='\[\e]0;тестоваястрока\a\]test prompt\$ ' test prompt$ echo hello world hello world test prompt$ # Press C-r, type 'he' and press End # Result: test prompt$rld ^-- cursor is here Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -g -O2 -Wno-parentheses -Wno-format-security uname output: Linux sid-bash 4.19.0-6-amd64 #1 SMP Debian 4.19.67- 2+deb10u2 (2019-11-11) x86_64 GNU/Linux Machine Type: x86_64-pc-linux-gnu Bash Version: 5.0 Patch Level: 11 Release Status: maint
Re: [readline] Multibyte invisible chars cause weird prompt length calculation issue
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, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/