From ef1c9b9f2bbd10a718c22620e66b9c7cf7939ea9 Mon Sep 17 00:00:00 2001 From: Benno Schulenberg Date: Sun, 9 Jun 2024 11:20:32 +0200 Subject: [PATCH] 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`. --- src/move.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/move.c b/src/move.c index c8da9e57..cefdd008 100644 --- 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 */