From c6746b33b83c68b20d75607161b00d66d941d746 Mon Sep 17 00:00:00 2001 From: Andrew Borodin Date: Tue, 17 Dec 2024 21:01:33 +0300 Subject: [PATCH] Ticket #4617, 4618: mcedit: fix page up/down jumps in window mode. (edit_execute_cmd): fix number of lines in CK_PageUp and CK_PageDown handling. Signed-off-by: Andrew Borodin --- src/editor/edit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/editor/edit.c b/src/editor/edit.c index 99b131513..9ff1a1054 100644 --- a/src/editor/edit.c +++ b/src/editor/edit.c @@ -3681,14 +3681,14 @@ edit_execute_cmd (WEdit *edit, long command, int char_for_insertion) MC_FALLTHROUGH; case CK_PageUp: case CK_MarkPageUp: - edit_move_up (edit, w->lines - 1, TRUE); + edit_move_up (edit, w->lines - (edit->fullscreen ? 1 : 2), TRUE); break; case CK_MarkColumnPageDown: edit->column_highlight = 1; MC_FALLTHROUGH; case CK_PageDown: case CK_MarkPageDown: - edit_move_down (edit, w->lines - 1, TRUE); + edit_move_down (edit, w->lines - (edit->fullscreen ? 1 : 2), TRUE); break; case CK_MarkColumnLeft: edit->column_highlight = 1;