TerminalEmulator: Do not scroll when below bottom margin
This commit is contained in:
@ -1295,12 +1295,20 @@ public final class TerminalEmulator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void doLinefeed() {
|
private void doLinefeed() {
|
||||||
|
boolean belowScrollingRegion = mCursorRow >= mBottomMargin;
|
||||||
int newCursorRow = mCursorRow + 1;
|
int newCursorRow = mCursorRow + 1;
|
||||||
if (newCursorRow >= mBottomMargin) {
|
if (belowScrollingRegion) {
|
||||||
scrollDownOneLine();
|
// Move down (but not scroll) as long as we are above the last row.
|
||||||
newCursorRow = mBottomMargin - 1;
|
if (mCursorRow != mRows - 1) {
|
||||||
|
setCursorRow(newCursorRow);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (newCursorRow == mBottomMargin) {
|
||||||
|
scrollDownOneLine();
|
||||||
|
newCursorRow = mBottomMargin - 1;
|
||||||
|
}
|
||||||
|
setCursorRow(newCursorRow);
|
||||||
}
|
}
|
||||||
setCursorRow(newCursorRow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void continueSequence(int state) {
|
private void continueSequence(int state) {
|
||||||
|
Reference in New Issue
Block a user