Linux console, ESC[K while bold turned on

Marcin 'Qrczak' Kowalczyk (qrczak@knm.org.pl)
Sun, 18 Apr 1999 14:22:55 +0200


Erasing part of console with e.g. ESC[K uses roughly current colors, but
with neutral bold, blink, underline and reverse attributes. The effect is
that when an editor (jed) uses bold characters and sometimes erases the
display with ESC[K instead of writing spaces, the cursor placed over those
places has the color with bold turned off, which in some cases (yellow
color changed into brown) makes the cursor almost invisible.

I think that at least intensity should be preserved. The foreground color
of blanks generally does not matter, but it influences the cursor color in
VGA text mode...

I'm not sure about other attributes: whether ESC[7mESC[K should paint the
line with reversed spaces or not.

--- linux-2.2.6/drivers/char/console.c.orig Sat Apr 17 17:24:06 1999
+++ linux-2.2.6/drivers/char/console.c Sat Apr 17 17:25:02 1999
@@ -355,7 +355,7 @@
static void update_attr(int currcons)
{
attr = build_attr(currcons, color, intensity, blink, underline, reverse ^ decscnm);
- video_erase_char = (build_attr(currcons, color, 1, 0, 0, decscnm) << 8) | ' ';
+ video_erase_char = (build_attr(currcons, color, intensity, 0, 0, decscnm) << 8) | ' ';
}

/* Note: inverting the screen twice should revert to the original state */

-- 
 __("<    Marcin Kowalczyk * qrczak@knm.org.pl http://kki.net.pl/qrczak/
 \__/       GCS/M d- s+:-- a22 C+++>+++$ UL++>++++$ P+++ L++>++++$ E->++
  ^^                W++ N+++ o? K? w(---) O? M- V? PS-- PE++ Y? PGP->+ t
QRCZAK                  5? X- R tv-- b+>++ DI D- G+ e>++++ h! r--%>++ y-

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/