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`.
This commit is contained in:
Benno Schulenberg 2024-06-09 11:20:32 +02:00
parent 90e62db26e
commit ef1c9b9f2b

View File

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