sc: Move prev_ysize under #ifndef SC_NO_HISTORY.

This commit is contained in:
John Baldwin 2022-04-12 14:58:59 -07:00
parent e4d4beba43
commit fdf288f39d

View File

@ -140,7 +140,9 @@ sc_set_text_mode(scr_stat *scp, struct tty *tp, int mode, int xsize, int ysize,
video_info_t info;
struct winsize wsz;
u_char *font;
#ifndef SC_NO_HISTORY
int prev_ysize;
#endif
int error;
int s;
@ -200,8 +202,8 @@ sc_set_text_mode(scr_stat *scp, struct tty *tp, int mode, int xsize, int ysize,
#ifndef SC_NO_HISTORY
if (scp->history != NULL)
sc_hist_save(scp);
#endif
prev_ysize = scp->ysize;
#endif
/*
* This is a kludge to fend off scrn_update() while we
* muck around with scp. XXX
@ -384,8 +386,8 @@ sc_set_pixel_mode(scr_stat *scp, struct tty *tp, int xsize, int ysize,
#ifndef SC_NO_HISTORY
if (scp->history != NULL)
sc_hist_save(scp);
#endif
prev_ysize = scp->ysize;
#endif
scp->status |= (UNKNOWN_MODE | PIXEL_MODE | MOUSE_HIDDEN);
scp->status &= ~(GRAPHICS_MODE | MOUSE_VISIBLE);
scp->xsize = xsize;