--- src/sys/dev/misc/syscons/scvidctl.c 2005/07/17 16:50:40 1.11 +++ src/sys/dev/misc/syscons/scvidctl.c 2005/08/21 19:11:28 1.12 @@ -54,6 +54,7 @@ sc_set_text_mode(scr_stat *scp, struct t video_info_t info; u_char *font; int prev_ysize; + int new_ysize; int error; if ((*vidsw[scp->sc->adapter]->get_info)(scp->sc->adp, mode, &info)) @@ -108,9 +109,12 @@ sc_set_text_mode(scr_stat *scp, struct t } /* set up scp */ + new_ysize = 0; #ifndef SC_NO_HISTORY - if (scp->history != NULL) + if (scp->history != NULL) { sc_hist_save(scp); + new_ysize = sc_vtb_rows(scp->history); + } #endif prev_ysize = scp->ysize; /* @@ -136,7 +140,7 @@ sc_set_text_mode(scr_stat *scp, struct t sc_alloc_cut_buffer(scp, FALSE); #endif #ifndef SC_NO_HISTORY - sc_alloc_history_buffer(scp, 0, prev_ysize, FALSE); + sc_alloc_history_buffer(scp, new_ysize, prev_ysize, FALSE); #endif crit_exit(); @@ -232,6 +236,7 @@ sc_set_pixel_mode(scr_stat *scp, struct video_info_t info; u_char *font; int prev_ysize; + int new_ysize; int error; if ((*vidsw[scp->sc->adapter]->get_info)(scp->sc->adp, scp->mode, &info)) @@ -322,9 +327,12 @@ sc_set_pixel_mode(scr_stat *scp, struct #endif /* set up scp */ + new_ysize = 0; #ifndef SC_NO_HISTORY - if (scp->history != NULL) + if (scp->history != NULL) { sc_hist_save(scp); + new_ysize = sc_vtb_rows(scp->history); + } #endif prev_ysize = scp->ysize; scp->status |= (UNKNOWN_MODE | PIXEL_MODE | MOUSE_HIDDEN); @@ -343,7 +351,7 @@ sc_set_pixel_mode(scr_stat *scp, struct sc_alloc_cut_buffer(scp, FALSE); #endif #ifndef SC_NO_HISTORY - sc_alloc_history_buffer(scp, 0, prev_ysize, FALSE); + sc_alloc_history_buffer(scp, new_ysize, prev_ysize, FALSE); #endif crit_exit();