nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 4b03cc60cf13d4e98b88b0289c8e4b749d6b9e92
parent c356db9f44a669ee66d5cc14e6968b31e1a6210e
Author: Benno Schulenberg <bensberg@telfort.nl>
Date:   Wed, 17 Jul 2024 16:45:08 +0200

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 <tpapastylianou@hotmail.com>

Bug existed since version 8.0, since Alt+Home/Alt+End were introduced.

Diffstat:
Msrc/move.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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. */