Make Shift-PgUp and Shift-PgDn scroll by pages rather than lines

In other terminals, such as gnome-terminal, Shift-PgUp and Shift-PgDn
scroll the screen by a full page, rather than a single line. Adjust
termux to match.
This commit is contained in:
Josh Triplett
2024-08-16 01:21:41 -07:00
committed by Fredrik Fornwall
parent f80b46487d
commit 661c37501f

View File

@@ -894,7 +894,7 @@ public final class TerminalView extends View {
if (shiftDown) {
long time = SystemClock.uptimeMillis();
MotionEvent motionEvent = MotionEvent.obtain(time, time, MotionEvent.ACTION_DOWN, 0, 0, 0);
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -1 : 1);
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -mEmulator.mRows : mEmulator.mRows);
motionEvent.recycle();
return true;
}