From 4b03cc60cf13d4e98b88b0289c8e4b749d6b9e92 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Wed, 17 Jul 2024 16:45:08 +0200 Subject: [PATCH] moving: for Alt+Home/Alt+End, refresh the screen when the mark is on When the mark is on, moving the cursor to the top or bottom row should highlight the relevant area -- thus requiring a call of edit_refresh() to be scheduled. Also, drop two calls of place_the_cursor(), as that is done anyhow in the main loop, either directly, or indirectly through edit_refresh(). This fixes https://savannah.gnu.org/bugs/?65992. Reported-by: Tasos Papastylianou Bug existed since version 8.0, since Alt+Home/Alt+End were introduced. --- src/move.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/move.c b/src/move.c index cefdd008..ef350341 100644 --- a/src/move.c +++ b/src/move.c @@ -189,7 +189,7 @@ void to_top_row(void) set_proper_index_and_pww(&leftedge, offset, FALSE); - place_the_cursor(); + refresh_needed = (openfile->mark); } /* Place the cursor on the last row in the viewport, when possible. */ @@ -205,7 +205,7 @@ void to_bottom_row(void) go_forward_chunks(editwinrows - 1, &openfile->current, &leftedge); set_proper_index_and_pww(&leftedge, offset, TRUE); - place_the_cursor(); + refresh_needed = (openfile->mark); } /* Put the cursor line at the center, then the top, then the bottom. */