Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=80330 --- shadow/80330 2006-12-20 11:32:52.000000000 -0500 +++ shadow/80330.tmp.10908 2006-12-20 11:32:52.000000000 -0500 @@ -0,0 +1,66 @@ +Bug#: 80330 +Product: Mono: Class Libraries +Version: 1.2 +OS: SUSE 9.2 +OS Details: Suse 9.3 on Pentium4 2400 +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: CORLIB +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: TermInfoDriver ForegroundColor and BackgroundColor don't reflect initial colors + +Description of Problem: +If you want to highlight something on the console, you'll probably change +the color, write something, and change back to the old color. +The problem is, that Console.ForegroundColor -> +TermInfoDriver.ForegroundColor defaults to ConsoleColor.White and the +Console.BackgroundColor -> TermInfoDriver.BackgroundColor to +ConsoleColor.Black no matter what the color actually is. Therefore +the "change back" part may lead to white on bright yellow text (as in my +case with xterm). + +Steps to reproduce the problem: +Execute the following program: +----------- +using System; + +namespace MonoConsoleTest +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("normal"); + ConsoleColor oldCol = Console.ForegroundColor; + Console.ForegroundColor = ConsoleColor.Red; + Console.WriteLine("highlight"); + Console.ForegroundColor = oldCol; + Console.WriteLine("back to normal"); + } + } +} +----------- + +Actual Results: +"back to normal" is as good as invisible, if your background color is very +bright, as the foreground color is white. + +Expected Results: +"back to normal" appears in your standard foreground color (in my case +black). + +How often does this happen? +Always + +Additional Information: +Mono version: 1.2.2.1 + +This appears to be no problem in Windows, as some kind of color mapping is +applied if you change the console colors of the cmd.exe. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
