Skip to content

Commit 661c375

Browse files
joshtriplettfornwall
authored andcommitted
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.
1 parent f80b464 commit 661c375

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

terminal-view/src/main/java/com/termux/view/TerminalView.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ public boolean handleKeyCodeAction(int keyCode, int keyMod) {
894894
if (shiftDown) {
895895
long time = SystemClock.uptimeMillis();
896896
MotionEvent motionEvent = MotionEvent.obtain(time, time, MotionEvent.ACTION_DOWN, 0, 0, 0);
897-
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -1 : 1);
897+
doScroll(motionEvent, keyCode == KeyEvent.KEYCODE_PAGE_UP ? -mEmulator.mRows : mEmulator.mRows);
898898
motionEvent.recycle();
899899
return true;
900900
}

0 commit comments

Comments
 (0)