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.
This commit is contained in:
Benno Schulenberg 2024-07-17 16:45:08 +02:00
parent c356db9f44
commit 4b03cc60cf

View File

@ -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. */