CSI 2J: Do not append current screen to history

Authored by mglb on Jun 15 2019, 8:55 PM.

Description

CSI 2J: Do not append current screen to history

Summary:
This behavior is present in e.g. xterm and linux console.

Currently when using CSI 2J escape sequence, screen contents are
appended to scrollback (including bottom empty lines). This is breaking
clear command, which replaces scrollback with current screen contents.

BUG: 384218

Test Plan:

  • Start Konsole with a shell
  • clear

Expected result:
Cleared display, empty scrollback.
Actual result:
Cleared display, but scrollback contains previous display contents.


  • Start Konsole with a shell
  • seq 1000
  • echo -ne '\033[2J

Expected result:
Cleared display, numbers in last scrollback lines.
Actual result:
Cleared display, but scrollback contains previous display contents
(i.e. shell prompt in last lines)

Reviewers: Konsole, hindenburg

Reviewed By: Konsole, hindenburg

Subscribers: hindenburg, konsole-devel, Konsole

Tags: Konsole

Differential Revision: https://phabricator.kde.org/D21282

Details

Committed
hindenburgJun 15 2019, 9:03 PM
Reviewer
Konsole
Differential Revision
D21282: CSI 2J: Do not append current screen to history
Parents
R319:22d8bd5b0959: Merge branch 'D20816' into 'master'
Branches
Unknown
Tags
Unknown