This is the mail archive of the cygwin-developers@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Terminal handling with the 990809 snapshot


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 <glenn@gs.fay.nc.us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )  _  _  _  _  _  _  _  _  _  _  _  _  _  _  )   >-----._/_/__]>
 )- blue skies - happy trails - sweet dreams -)             `0  |

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]