Implement CSI 3 J - Clear transcript

This commit is contained in:
iamahuman
2019-01-25 12:31:35 +09:00
committed by Fredrik Fornwall
parent c986a46fb9
commit 2a36b915cb
4 changed files with 35 additions and 2 deletions

View File

@@ -358,10 +358,12 @@ public final class TerminalView extends View {
public void onScreenUpdated() {
if (mEmulator == null) return;
int rowsInHistory = mEmulator.getScreen().getActiveTranscriptRows();
if (mTopRow < -rowsInHistory) mTopRow = -rowsInHistory;
boolean skipScrolling = false;
if (mIsSelectingText) {
// Do not scroll when selecting text.
int rowsInHistory = mEmulator.getScreen().getActiveTranscriptRows();
int rowShift = mEmulator.getScrollCounter();
if (-mTopRow + rowShift > rowsInHistory) {
// .. unless we're hitting the end of history transcript, in which