tweaks: pull a fragment of code a bit forward, to enable the next commit

This commit is contained in:
Benno Schulenberg 2024-03-09 08:28:46 +01:00
parent e76068a2de
commit 0c8a3b5c3e

View File

@ -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();