Version: (using KDE KDE 3.0.3) Installed from: Compiled From Sources Compiler: gcc-3.2 OS: Linux The use of ANSI sequences in konsole seems to confuse konsole's idea of where the current write position is. When I run a bash shell inside konsole and set the prompt string to contain ANSI escape sequences, then when typing long lines the write position wraps back to the beginning of the current line before the right margin has been reached. The same behaviour can be observed with xterm, so the problem obviously has been inherited from there.
What ANSI sequences? And you exclude an error of you when the two best terminal emulators both show this behaviour? :-)
Steps to reproduce: 1. Start a bash shell inside konsole. 2. Enter PS1="\e]2;\w\a\e[34;1m\! \s-\v \$\e[0m " 3. Type a long line (contents do not matter).
Likely a bash problem.
Even simple things like coloring the prompt will confuse konsole. This is just too bad! export PS1="\e[0;33m\u:\w> \e[0m"
The same results occur when entering that command sequence into gnome-terminal or xterm when using a BASH shell. As far as I know gnome-terminal, Konsole and xterm all use different emulation code. > The same behaviour can be observed with xterm, > so the problem obviously has been inherited from there Konsole does not use any xterm code, so I shouldn't think this is the case.
This is not a bug in Konsole or xterm. This is the shell that is confused about where it is, not the terminal. You just have to properly configure your shell to ignore ESC sequences when counting characters that move the cursor. With bash, just wrap ESC sequences with \[ and \]. For example: export PS1='\[\e[0;33m\]\u:\w> \[\e[0m\]' With ksh, this is not as easy, but you can use '\015' to tell the shell from which char it must count characters. The resolution of the bug must be INVALID instead of WONTFIX.
For reference, see the Bash FAQ <ftp://ftp.cwru.edu/pub/bash/FAQ>, question E3.
This is caused by libreadline, which is used by bash. solution: Enclose escape sequence by \[...\] to tell bash that it has zero length.
*** Bug 138413 has been marked as a duplicate of this bug. ***