www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1998/09/02/15:30:04

From: noer AT cygnus DOT com (Geoffrey Noer)
Subject: [norman AT arcady DOT u-net DOT com: Bug in tty output]
2 Sep 1998 15:30:04 -0700 :
Message-ID: <19980902144847.01647.cygnus.cygwin32.developers@cygnus.com>
Mime-Version: 1.0
To: cygwin32-developers AT cygnus DOT com

Hi,

Anyone have comments re: this patch?

-gjn

-----Forwarded message from NF Stevens <norman AT arcady DOT u-net DOT com>-----

From: norman AT arcady DOT u-net DOT com (NF Stevens)
To: <noer AT cygnus DOT com> Geoffrey Noer
Subject: Bug in tty output
Date: Wed, 02 Sep 1998 19:51:53 GMT

Further to my email of yesterday concerning the problem
of disappearing color in tty mode. It seems that this
is a feature of Windows itself. Whenever the console is
sent a carriage return character followed by a new line
character it clears the color attributes of the current
line (unless the cursor is on the bottom line of the
screen). The following code seems to get around this
problem.

Norman
------------------------------------------------------
***************
*** 882,897 ****
  	  break;
  	case DWN:		/* WriteFile("\n") always adds CR... */
  	  cursor_get (&x, &y);
! 	  if (get_w_binary () && y < info.winBottom)
! 	    {
! 	      cursor_set (FALSE, x, y+1);
! 	    }
! 	  else
! 	    {
! 	      WriteFile (get_output_handle (), "\n", 1, &done, 0);
! 	      if (get_w_binary ())
! 		cursor_rel (x, 0);
! 	    }
            if (y == srBottom && y < info.winBottom)
              {
                scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
--- 881,889 ----
  	  break;
  	case DWN:		/* WriteFile("\n") always adds CR... */
  	  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)
              {
                scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
***************

-----End of forwarded message-----

-- 
Geoffrey Noer
noer AT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019