Index: drivers/char/console.c =================================================================== RCS file: /home/gondor/herbert/src/CVS/debian/kernel-source/drivers/char/console.c,v retrieving revision 1.1.1.3 diff -u -r1.1.1.3 console.c --- drivers/char/console.c 2000/01/04 18:12:14 1.1.1.3 +++ drivers/char/console.c 2000/04/16 01:07:19 @@ -354,8 +354,13 @@ static void update_attr(int currcons) { + unsigned short old_char; + attr = build_attr(currcons, color, intensity, blink, underline, reverse ^ decscnm); + old_char = video_erase_char; video_erase_char = (build_attr(currcons, color, 1, 0, 0, decscnm) << 8) | ' '; + if (old_char != video_erase_char) + need_pad = 1; } /* Note: inverting the screen twice should revert to the original state */ @@ -833,6 +838,7 @@ y = new_y; pos = origin + y*video_size_row + (x<<1); need_wrap = 0; + need_pad = 0; } /* for absolute user moves, when decom is set */ @@ -859,8 +865,25 @@ scrolldelta(lines); } +static void pad(int currcons) +{ + int cnt; + + need_pad = 0; + + if (need_wrap) + return; + + cnt = video_num_columns - x; + scr_memsetw((u16 *)pos, video_erase_char, cnt * 2); + if (DO_UPDATE) + sw->con_clear(vc_cons[currcons].d, y, x, 1, video_num_columns); +} + static void lf(int currcons) { + if (need_pad) + pad(currcons); /* don't scroll if above bottom of scrolling region, or * if below scrolling region */ @@ -875,6 +898,8 @@ static void ri(int currcons) { + if (need_pad) + pad(currcons); /* don't scroll if below top of scrolling region, or * if above scrolling region */ @@ -889,6 +914,8 @@ static inline void cr(int currcons) { + if (need_pad) + pad(currcons); pos -= x<<1; need_wrap = x = 0; } @@ -924,6 +951,7 @@ video_num_lines-y-1, video_num_columns); } + need_pad = 0; break; case 1: /* erase from start to cursor */ count = ((pos-origin)>>1)+1; @@ -943,6 +971,7 @@ sw->con_clear(vc_cons[currcons].d, 0, 0, video_num_lines, video_num_columns); + need_pad = 0; break; default: return; @@ -963,6 +992,7 @@ if (DO_UPDATE) sw->con_clear(vc_cons[currcons].d, y, x, 1, video_num_columns-x); + need_pad = 0; break; case 1: /* erase from start of line to cursor */ start = (unsigned short *) (pos - (x<<1)); @@ -977,6 +1007,7 @@ if (DO_UPDATE) sw->con_clear(vc_cons[currcons].d, y, 0, 1, video_num_columns); + need_pad = 0; break; default: return; @@ -1270,6 +1301,7 @@ { scrdown(currcons,y,bottom,nr); need_wrap = 0; + need_pad = 0; } @@ -1277,6 +1309,7 @@ { scrup(currcons,y,bottom,nr); need_wrap = 0; + need_pad = 0; } static void csi_at(int currcons, unsigned int nr) @@ -1343,6 +1376,7 @@ translate = set_translate(charset ? G1_charset : G0_charset,currcons); update_attr(currcons); need_wrap = 0; + need_pad = 0; } enum { ESnormal, ESesc, ESsquare, ESgetpars, ESgotpars, ESfunckey, @@ -1388,6 +1422,7 @@ default_attr(currcons); update_attr(currcons); + need_pad = 0; tab_stop[0] = 0x01010100; tab_stop[1] = Index: drivers/char/console_macros.h =================================================================== RCS file: /home/gondor/herbert/src/CVS/debian/kernel-source/drivers/char/console_macros.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 console_macros.h --- drivers/char/console_macros.h 1998/09/17 16:35:03 1.1.1.1 +++ drivers/char/console_macros.h 2000/04/15 23:28:27 @@ -36,6 +36,7 @@ #define decim (vc_cons[currcons].d->vc_decim) #define deccolm (vc_cons[currcons].d->vc_deccolm) #define need_wrap (vc_cons[currcons].d->vc_need_wrap) +#define need_pad (vc_cons[currcons].d->vc_need_pad) #define kmalloced (vc_cons[currcons].d->vc_kmalloced) #define report_mouse (vc_cons[currcons].d->vc_report_mouse) #define color (vc_cons[currcons].d->vc_color) Index: include/linux/console_struct.h =================================================================== RCS file: /home/gondor/herbert/src/CVS/debian/kernel-source/include/linux/console_struct.h,v retrieving revision 1.1.1.1 diff -u -r1.1.1.1 console_struct.h --- include/linux/console_struct.h 1998/09/17 16:35:04 1.1.1.1 +++ include/linux/console_struct.h 2000/04/15 22:56:13 @@ -62,6 +62,7 @@ /* misc */ unsigned int vc_ques : 1; unsigned int vc_need_wrap : 1; + unsigned int vc_need_pad : 1; unsigned int vc_can_do_color : 1; unsigned int vc_report_mouse : 2; unsigned int vc_kmalloced : 1;