* fhandler_console.cc (set_color): Avoid (again) inappropriate

intensity interchanging that used to render reverse output unreadable
	when (non-reversed) text is bright.
	See http://sourceware.org/bugzilla/show_bug.cgi?id=514
This commit is contained in:
Corinna Vinschen 2006-11-23 10:08:04 +00:00
parent 9e3f289f51
commit bf4071fad0
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,10 @@
2006-11-23 Thomas Wolff <towo@computer.org>
* fhandler_console.cc (set_color): Avoid (again) inappropriate
intensity interchanging that used to render reverse output unreadable
when (non-reversed) text is bright.
See http://sourceware.org/bugzilla/show_bug.cgi?id=514
2006-11-23 Joe Loh <joel@pivot3.com>
* devices.h: Add additional SCSI disk block device numbers per

View File

@ -948,6 +948,8 @@ dev_console::set_color (HANDLE h)
(save_fg & FOREGROUND_BLUE ? BACKGROUND_BLUE : 0) |
(save_fg & FOREGROUND_INTENSITY ? BACKGROUND_INTENSITY : 0);
}
/* apply attributes */
if (underline)
win_fg = underline_color;
/* emulate blink with bright background */
@ -956,7 +958,12 @@ dev_console::set_color (HANDLE h)
if (intensity == INTENSITY_INVISIBLE)
win_fg = win_bg;
else if (intensity == INTENSITY_BOLD)
win_fg |= FOREGROUND_INTENSITY;
/* apply foreground intensity only in non-reverse mode! */
if (reverse)
win_bg |= BACKGROUND_INTENSITY;
else
win_fg |= FOREGROUND_INTENSITY;
current_win32_attr = win_fg | win_bg;
if (h)
SetConsoleTextAttribute (h, current_win32_attr);