[This is a problem with readline compiled into bash; I chose to file it against readline, hoping that its maintainer might know how to fix it. ;-] Description of problem: The cursor position is wrong after serach in commandline history. Version-Release number of selected component (if applicable): $ rpm -q bash && bash --version bash-3.1-16.1 GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu) How reproducible: always Steps to Reproduce: 0. bash 1. LC_CTYPE=en_US.UTF-8 2. PS1='\[\e[?17;15;175c\]{some_ps1_text}:' 3. ctrl-R (start incremental search backwards) 4. ctrl-G (cancel it) Expected results: The cursor shall be positioned just after the prompt text. Actual results: The cursor is positioned on letter `m' in the middle of the prompt text `{some_ps1_text}:'. Additional info: Note that my PS1 contains a non-printing control sequence; it is enclosed in \[...\] pair, to tell readline about it. With C locale, this mechanism works, but it seems it does not work with utf-8 locales. Actually the cursor is positioned 13 characters to the left from the correct position. And 13 is the length of the non-printing sequence in the prompt. I have tried a shorter non-printing sequence and again, the skew was equal to its length.
Upstream has released a patch that fixes this issue. ftp://ftp.cwru.edu/pub/bash/readline-5.2-patches/readline52-004
Thanks a lot! I hope comment #1 will help the bash maintainer.
Still valid for F7 bash-3.2-9.fc7.
*** Bug 155444 has been marked as a duplicate of this bug. ***
I've just built bash-3.2-11.fc8 in devel which brings it to patchlevel 17.
bash-3.2-19.fc7 has been pushed to the Fedora 7 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update bash'
bash-3.2-19.fc7 has been pushed to the Fedora 7 stable repository. If problems still persist, please make note of it in this bug report.