[konsole] [Bug 453568] "clear scrollback and reset" places cursor at wrong position

Kurt Hindenburg bugzilla_noreply at kde.org
Mon May 16 23:58:28 BST 2022


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

Kurt Hindenburg <kurt.hindenburg at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Latest Commit|                            |https://invent.kde.org/util
                   |                            |ities/konsole/commit/9dadb7
                   |                            |b562e9ecbffa107c9fcd2616661
                   |                            |dbe626f
         Resolution|---                         |FIXED
             Status|REPORTED                    |RESOLVED

--- Comment #3 from Kurt Hindenburg <kurt.hindenburg at gmail.com> ---
Git commit 9dadb7b562e9ecbffa107c9fcd2616661dbe626f by Kurt Hindenburg, on
behalf of Luis Javier Merino MorĂ¡n.
Committed on 16/05/2022 at 22:51.
Pushed by hindenburg into branch 'master'.

Fix regression preserving tcsh command prompt

Commit c3b3ef19 introduced a regression when invoking the
clear-history-and-reset action.  While RIS (Reset to Initial State) is
specified in DEC STD-070 as homing the cursor, konsole has grown some
hacks in the name of usability to preserve the command prompt line.

For a long time, it has sent two SIGWINCH with changed sizes after clear
and reset actions to force the shell to redraw the prompt (see d346a2cc,
temporarily disabled on 5d61b69e and re-added on 82778e87), which works
for bash, zsh, ksh, ...

tcsh doesn't redraw its prompt on SIGWINCH, but commit b8e96bcd modified
Screen::refresh() so instead of clearing the entire screen and homing
the cursor, it scrolled up everything but the last (usually the prompt)
line.

So, keep that last hack when called from clear-history-and-reset, and
behave as specified on DEC STD-070 otherwise.

Note that other ways of clearing the screen don't need hacks, e.g.
Ctrl-L, if handled at all, is handled by the shell, which then redraws
its prompt.  Calling "clear" or invoking "printf '\ec'" will result in
the shell redrawing its prompt in the usual way.

M  +3    -2    src/Emulation.h
M  +13   -8    src/Screen.cpp
M  +6    -3    src/Screen.h
M  +3    -3    src/Vt102Emulation.cpp
M  +1    -1    src/Vt102Emulation.h
M  +1    -1    src/session/SessionController.cpp

https://invent.kde.org/utilities/konsole/commit/9dadb7b562e9ecbffa107c9fcd2616661dbe626f

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


More information about the konsole-devel mailing list