Implement CSI 3 J - Clear transcript
This commit is contained in:
committed by
Fredrik Fornwall
parent
c986a46fb9
commit
2a36b915cb
@@ -1,5 +1,7 @@
|
||||
package com.termux.terminal;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* A circular buffer of {@link TerminalRow}:s which keeps notes about what is visible on a logical screen and the scroll
|
||||
* history.
|
||||
@@ -422,4 +424,14 @@ public final class TerminalBuffer {
|
||||
}
|
||||
}
|
||||
|
||||
public void clearTranscript() {
|
||||
if (mScreenFirstRow < mActiveTranscriptRows) {
|
||||
Arrays.fill(mLines, mTotalRows + mScreenFirstRow - mActiveTranscriptRows, mTotalRows, null);
|
||||
Arrays.fill(mLines, 0, mScreenFirstRow, null);
|
||||
} else {
|
||||
Arrays.fill(mLines, mScreenFirstRow - mActiveTranscriptRows, mScreenFirstRow, null);
|
||||
}
|
||||
mActiveTranscriptRows = 0;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user