commit ef1c9b9f2bbd10a718c22620e66b9c7cf7939ea9
parent 90e62db26e91264241f1366dea4eda8cc584f35c
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sun, 9 Jun 2024 11:20:32 +0200
tweaks: implement do_center() with a single call instead of three
This works because the main loop sets 'cycling_aim' to zero
whenever the current keystroke is not bound to `cycle`.
Diffstat:
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/move.c b/src/move.c
@@ -227,9 +227,7 @@ void do_cycle(void)
/* Scroll the line with the cursor to the center of the screen. */
void do_center(void)
{
- adjust_viewport(CENTERING);
- draw_all_subwindows();
- full_refresh();
+ do_cycle(); /* The main loop has set 'cycling_aim' to zero. */
}
#endif /* !NANO_TINY */