bug-bash
[Top][All Lists]
Advanced

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

readline does not always redraw line very well


From: Jan Engelhardt
Subject: readline does not always redraw line very well
Date: Sat, 14 Jun 2008 23:46:22 +0200 (CEST)
User-agent: Alpine 1.10 (LNX 962 2008-03-14)


Configuration Information [Automatically generated, do not change]:
Machine: i586
OS: linux-gnu
Compiler: gcc -I/usr/src/packages/BUILD/bash-3.2 
-L/usr/src/packages/BUILD/bash-3.2/../readline-5.2
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i586' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i586-suse-linux-gnu' 
-DCONF_VENDOR='suse' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -O2 -march=i586 -mtune=i686 
-fmessage-length=0 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector -g -D_GNU_SOURCE 
-DRECYCLES_PIDS -Wall -pipe -g -fPIE -fprofile-use
uname output: Linux yaguchi 2.6.25.6-jen67-rt #1 SMP PREEMPT RT 2008-05-26 
15:23:05 +0200 i686 athlon i386 GNU/Linux
Machine Type: i586-suse-linux-gnu (opensuse 10.3)

Bash Version: 3.2
Patch Level: 25
Release Status: release

Description:/Repeat-By:
Having a prompt with color definitions makes readline reposition
the cursor wrong on many occassions. Here is one of them.

export PS1="\[\e[1;30m\]\A \[\e[0;32m\]\h:\w \[\e[1;37m\]>\[\e[0m\] ";

(type the following verbatim)
echo word1 word2 word3 word4 word5 word6
(now hit keys Alt-4 Alt-b to move the cursor 4 words to the left)

The cursor will be repositioned to a column inside the prompt area
instead of the designated position. I suppose this is due to
readline using (or bash passing in) strlen(PS1) instead of
strlen(stripescapecodes(PS1)).

Environment: xterm-229, libreadline-5.2





reply via email to

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