Skip to content
Commit 7a1116cc authored by Mariusz Glebocki's avatar Mariusz Glebocki Committed by Kurt Hindenburg
Browse files

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
parent 22d8bd5b
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment