Jan Engelhardt c9e587abfd vt: fix background color on line feed
A command that causes a line feed while a background color is active,
such as

	perl -e 'print "x" x 60, "\e[44m", "x" x 40, "\e[0m\n"'
and
	perl -e 'print "x" x 40, "\e[44m\n", "x" x 40, "\e[0m\n"'

causes the line that was started as a result of the line feed to be completely
filled with the currently active background color instead of the default
color.

When scrolling, part of the current screen is memcpy'd/memmove'd to the new
region, and the new line(s) that will appear as a result are cleared using
memset.  However, the lines are cleared with vc->vc_video_erase_char, causing
them to be colored with the currently active background color.  This is
different from X11 terminal emulators which always paint the new lines with
the default background color (e.g.  `xterm -bg black`).

The clear operation (\e[1J and \e[2J) also use vc_video_erase_char, so a new
vc->vc_scrl_erase_char is introduced with contains the erase character used
for scrolling, which is built from vc->vc_def_color instead of vc->vc_color.

Signed-off-by: Jan Engelhardt <jengelh@computergmbh.de>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2008-04-29 08:06:06 -07:00
..
2007-10-18 14:37:17 -07:00
2008-03-10 18:01:20 -07:00
2008-02-03 17:31:49 +02:00
2007-10-19 11:53:42 -07:00
2008-04-28 08:58:38 -07:00
2008-04-28 08:58:18 -07:00
2007-07-31 15:39:39 -07:00
2008-04-28 08:58:38 -07:00
2008-04-28 08:58:35 -07:00
2007-10-18 14:37:17 -07:00
2008-04-27 15:18:57 -07:00
2008-04-27 15:18:57 -07:00
2008-04-27 15:18:57 -07:00
2008-02-03 17:31:49 +02:00
2007-11-29 09:24:52 -08:00
2008-03-19 18:53:37 -07:00
2008-02-06 10:41:15 -08:00
2008-04-27 15:18:57 -07:00
2007-11-14 18:45:42 -08:00
2008-04-28 08:58:35 -07:00
2008-02-06 10:41:15 -08:00
2008-02-06 10:41:16 -08:00
2008-04-27 15:18:57 -07:00
2008-04-28 08:58:41 -07:00
2007-10-16 09:43:20 -07:00
2008-02-06 10:41:17 -08:00
2008-04-28 08:58:38 -07:00
2007-10-16 09:43:14 -07:00
2008-03-04 16:35:13 -08:00
2007-10-16 09:43:22 -07:00
2008-04-27 15:18:57 -07:00
2007-10-16 09:43:18 -07:00
2008-04-28 08:58:38 -07:00