[konsole] [Bug 432669] Corruption of screen when using ncurses when terminal resized depending on line content

bugzilla_noreply at kde.org bugzilla_noreply at kde.org
Sun Jul 4 00:12:43 BST 2021


https://bugs.kde.org/show_bug.cgi?id=432669

ninjalj at gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ninjalj at gmail.com

--- Comment #3 from ninjalj at gmail.com ---
nwipe does the following to write the last line:

SYS_write(1,
"mq\033[98bj\033(B\033(B\033[m\033[39;49m\033[97m\033[40m\033[21;12H\033(0\033[0m\033[37m\033[44m",
60) = 60
SYS_write(1, "\033(B\033[0m\033[34m\033[47m\033[1K ", 22)            = 22
SYS_write(1, "S=Start M=Method P=PRNG V=Verify R=Rounds B=Blanking Space=Select
Ctrl-C=Quit\033[K\033[7;61H", 87) = 87
SYS_write(1, "\033(B\033[m\033[39;49m\033[97m\033[40m", 24)          = 24

Notice that after printing "S=Start...", it clears to the end of line (CSI K).

and then, when pressing M to select a Method:

SYS_write(1, "\033[21;24H", 8)                                       = 8
SYS_write(1, "\033[34m\033[47m\033[1K\t", 15)                        = 15
SYS_write(1, "J=Down K=Up Space=Select Backspace=Cancel", 41)        = 41
SYS_write(1, "\033[12P\033[21;78H", 13)                              = 13
SYS_write(1, "\033(B\033[m\033[39;49m\033[97m\033[40m", 24)          = 24

so, it positions the cursor in the middle of the previous "S=Start..." status
message, clears to the beginning of line (CSI 1 K), writes the new "J=Down..."
message, and deletes 12 characters (CSI 12 P).

The bug appears because Konsole doesn't shrink lines when resizing (it just set
a variable _columns to the maximum column available), and CSI K (Erase Line)
just clears until _columns. Then when nwipe sends a CSI P (Delete CHaracters)
request, which deletes some characters in the middle of the last line,
characters from beyond _columns reappear.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the konsole-devel mailing list