commit 0c8a3b5c3ee9a99f2b3665f84be992961c702d16
parent e76068a2ded2ed8da2cf9383230945d35d88129f
Author: Benno Schulenberg <bensberg@telfort.nl>
Date: Sat, 9 Mar 2024 08:28:46 +0100
tweaks: pull a fragment of code a bit forward, to enable the next commit
Diffstat:
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/winio.c b/src/winio.c
@@ -3387,6 +3387,10 @@ void edit_refresh(void)
linestruct *line;
int row = 0;
+ /* If the current line is out of view, get it back on screen. */
+ if (current_is_offscreen())
+ adjust_viewport((focusing || ISSET(JUMPY_SCROLLING)) ? CENTERING : FLOWING);
+
#ifdef ENABLE_COLOR
/* When needed and useful, initialize the colors for the current syntax. */
if (openfile->syntax && !have_palette && !ISSET(NO_SYNTAX) && has_colors())
@@ -3399,10 +3403,6 @@ void edit_refresh(void)
}
#endif
- /* If the current line is out of view, get it back on screen. */
- if (current_is_offscreen())
- adjust_viewport((focusing || ISSET(JUMPY_SCROLLING)) ? CENTERING : FLOWING);
-
#ifndef NANO_TINY
if (thebar)
draw_scrollbar();