[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
GNU bash, version 3.1.17(1)-release (i686-redhat-linux-gnu)
Steps to Reproduce:
3. ctrl-R (start incremental search backwards)
4. ctrl-G (cancel it)
The cursor shall be positioned just after the prompt text.
The cursor is positioned on letter `m' in the middle of the prompt text
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
Upstream has released a patch that fixes this issue.
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.