[konsole] [Bug 397757] Background Color Erase: bce madness when line too long
Per Drive
bugzilla_noreply at kde.org
Thu Mar 10 21:16:55 GMT 2022
https://bugs.kde.org/show_bug.cgi?id=397757
Per Drive <perdrive at gmx.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |perdrive at gmx.com
--- Comment #4 from Per Drive <perdrive at gmx.com> ---
UP.
I have a related bug so instead of opening a new one, I'll try updating it to
give it visibility. And I think they have the same origin.
To me the bug lies in the calculations of the prompt size as it incorporates
control characters which should not be taken into account.
So, the way to reproduce it is way simpler than in the original submission:
Step one: create a color prompt such as:
> PS1='${debian_chroot:+($debian_chroot)}\033[93m\u@\h:\w\033[0m > '
Step two: trigger a bug.
press page up to call last cmd in history.
Then press End. This step is not necessary but it makes the bug occur 100% of
times.
Press Home to reach beginning of line. It doesnt.
Press End to reach end of line. It goes past that.
Note that in both cases (beginning & end of line), the offset is 9 characters,
which corresponds to the number of invisible chars in var PS1, with \033 being
1 char.
Other side effect : overwriting current line instead of creating a new one when
command longer than konsole width.
Fiddling with konsole window width shorter than the current command does
strange things to the cursor position.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the konsole-devel
mailing list