Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Unsubscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com Message-ID: <19990817163824.A21218@ba.best.com> Date: Tue, 17 Aug 1999 16:38:24 -0400 From: Glenn Spell To: cygwin-developers AT sourceware DOT cygnus DOT com Subject: Re: Terminal handling with the 990809 snapshot Mail-Followup-To: cygwin-developers AT sourceware DOT cygnus DOT com References: <19990810210956 DOT A15706 AT ba DOT best DOT com> <19990811154056 DOT C1219 AT cygnus DOT com> <19990817145646 DOT C10229 AT ba DOT best DOT com> <19990817161636 DOT C976 AT cygnus DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <19990817161636.C976@cygnus.com>; from "Chris Faylor" on Tue, Aug 17, 1999 at 04:16PM Organization: the aerie On 17 Aug 1999 around 4:16PM (-0400) Chris Faylor wrote: > On Tue, Aug 17, 1999 at 02:56:46PM -0400, Glenn Spell wrote: > > >On 11 Aug 1999 around 3:40PM (-0400) Chris Faylor wrote: > > > >>On Tue, Aug 10, 1999 at 09:09:56PM -0400, Glenn Spell wrote: > >> > >>>If I log into Cygwin with any shell and immediately issue the > >>>command "ls --color", I can see the color appear for an instant, > >>>but then it disappears and everything is black and white. If I > >>>continue issuing the same command, somewhere around the third to > >>>the fifth try... the color will "stick". > > If someone wants to take a stab at correcting the behavior, I'd be > happy to look at patches. I won't accept anything that slows down > scrolling or causes cygwin to update the screen incorrectly. For reference, this corrects the "ls --color" behavior by reverting part of your latest change. --- fhandler_console.cc.ORIG Thu Aug 05 21:28:24 1999 +++ fhandler_console.cc Mon Aug 16 20:24:02 1999 @@ -989,12 +989,19 @@ fhandler_console::write_normal (const un case ESC: state_ = gotesc; break; - case DWN: /* WriteFile("\n") always adds CR... */ + case DWN: cursor_get (&x, &y); - WriteFile (get_output_handle (), "\n", 1, &done, 0); + if (get_w_binary ()) - cursor_rel (x, 0); - if (y == srBottom && y < info.winBottom) + cursor_rel (0, 1); + else + { + x = 0; + cursor_set (FALSE, x, y + 1); + } + + if (y == srBottom) + { scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop); cursor_set (FALSE, x, y); @@ -1007,6 +1014,9 @@ fhandler_console::write_normal (const un cursor_rel (1, 0); break; case CR: + cursor_get (&x, &y); + cursor_set (FALSE, 0, y); + break; case ERR: WriteFile (get_output_handle (), src, 1, &done, 0); break; -glenn -- ) Glenn Spell ) _ _____ ) Fayetteville, North Carolina, U. S. A. )_ (__\____o /_/_ | ) _ _ _ _ _ _ _ _ _ _ _ _ _ _ ) >-----._/_/__]> )- blue skies - happy trails - sweet dreams -) `0 |