Summary: | Wrong behavior for 'delete char' ansi code | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Joel <joel.porquet> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | diaxen |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: |
The attached patch fixes the bug.
The attached patch fixes the bug and the Q_ASSERT. |
Description
Joel
2009-12-07 01:20:49 UTC
*** This bug has been confirmed by popular vote. *** The following bash command trigger the bug: echo -n $'AB\x1b[1D\x1b[1P' ; sleep 5 This command writes 'AB' then moves backward with ESC [1D and fails to delete the 'B' character under cursor with ESC [1P. xterm, linux, screen and other terminal emulators do have the correct behavior and delete 'B'. Created attachment 42911 [details]
The attached patch fixes the bug.
Did that patch actually work for you? When I did, the ASSERT crashed my konsole. Yes, I used it for a while on kdebase-4.3.4 before upgrading recently. I might not have Q_ASSERT enabled. I realize that this line seems wrong too: Q_ASSERT( cuX+n < screenLines[cuY].count() ) screenLines[cuY].remove(cuX,n); For instance lets assume curX == 0, Q_ASSERT prevents removing all characters on the line. However screenLines[cuY].remove(0, screenLines[cuY].count()) is a valid operation. Isn't it ? Created attachment 42977 [details]
The attached patch fixes the bug and the Q_ASSERT.
SVN commit 1119662 by hindenburg: Correct ANSI's 'delete char' to delete the last character in a line. Patch provided by Alexandre Becoulet BUG: 217669 M +3 -3 Screen.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1119662 SVN commit 1119960 by hindenburg: Correct ANSI's 'delete char' to delete the last character in a line. Patch provided by Alexandre Becoulet CCBUG: 217669 M +3 -3 Screen.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1119960 |