delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin-developers/1999/08/18/04:29:40

Mailing-List: contact cygwin-developers-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-developers-unsubscribe-archive-cygwin-developers=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin-developers/>
List-Post: <mailto:cygwin-developers AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-developers-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-developers-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin-developers AT sourceware DOT cygnus DOT com
Message-ID: <19990818042915.A18145@ba.best.com>
Date: Wed, 18 Aug 1999 04:29:15 -0400
From: Glenn Spell <glenn AT gs DOT fay DOT nc DOT us>
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> <s1sogg6m1az DOT fsf AT jaist DOT ac DOT jp>
Mime-Version: 1.0
X-Mailer: Mutt 0.93.2i
In-Reply-To: <s1sogg6m1az.fsf@jaist.ac.jp>; from "Kazuhiro Fujieda" on Wed, Aug 18, 1999 at 08:31AM
Organization: the aerie

On 18 Aug 1999 around 8:31AM (+0900) Kazuhiro Fujieda wrote:

> >>> On Tue, 17 Aug 1999 16:16:36 -0400 Chris Faylor
> >>> <cgf AT cygnus DOT com> said:
>
> > I remember one patch that, IIRC, essentially reverted to the
> > previous behavior.  I may be mistaken but I don't remember any
> > indication of considerable effort.  Perhaps Kazuhiro will correct
> > me if I'm wrong.

I believe he has already corrected you once concerning the reversion
issue. Concerning the effort, it was I who presumed that "careful
design" indicates considerable effort.

        On 27 May 1999 around 12:02PM (-0400) Chris Faylor wrote:

        > On Thu, May 27, 1999 at 05:41:32PM +0900, Kazuhiro Fujieda
        > wrote:
        >
        > >>>> On Mon, 17 May 1999 11:23:09 -0400 Chris Faylor
        > >>>> <cgf AT cygnus DOT com> said:
        > >
        > >> This patch essentially reverts the changes that were
        > >> added last month.
        > >
        > >I carefully designed my patch not to spoil the essence of
        > >the changes
        > >
        > >[And I carefully designed my patch] to properly support a
        > >terminal capability of a settable scrolling region.

But, the reversion issue was sidestepped. The subject was changed.

        > The problem was that attributes were screwed up with the
        > previous way of doing thins.

So... are attributes working correctly now?

> My patch wasn't one reverting to the previous behavior (that is the
> current behavior). It could improve scrolling speed, and didn't get
> back the attribute problem pointed out by Glenn.

I'm currently using your patch (actually, both patches) with the
990814 sources. It not only fixes the attribute problem but the
display performs faster. The speed improvement is especially
noticeable when running 'bash' from within 'screen'.

If you were to resubmit your patch against the current snapshot,
would it look something like this?

--- fhandler_console.cc.ORIG	Thu Aug 05 21:28:24 1999
+++ fhandler_console.cc		Wed Aug 18 00:47:12 1999
@@ -34,7 +34,7 @@ static struct
     } scroll_region = {0, -1};
 
 #define srTop (info.winTop + scroll_region.Top)
-#define srBottom (info.winTop + scroll_region.Bottom)
+#define srBottom ((scroll_region.Bottom < 0) ? info.winBottom : info.winTop + scroll_region.Bottom)
 
 #define use_tty ISSTATE (myself, PID_USETTY)
 
@@ -195,9 +195,6 @@ fhandler_console::fillin_info (void)
       info.winBottom = 24;
     }
 
-  if (scroll_region.Bottom < 0)
-    scroll_region.Bottom = info.dwWinSize.Y - 1;
-
   return ret;
 }
 
@@ -991,14 +988,18 @@ fhandler_console::write_normal (const un
 	  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)
+	  if (y == srBottom)
 	    {
-	      scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
-	      cursor_set (FALSE, x, y);
+	      if (y < info.winBottom || scroll_region.Top)
+		scroll_screen (0, srTop + 1, -1, srBottom, 0, srTop);
+	      else
+		WriteFile (get_output_handle (), "\n", 1, &done, 0);
 	    }
+	  else
+	    y++;
+	  if (!get_w_binary ())
+	      x = 0;
+	  cursor_set (FALSE, x, y);
 	  break;
 	case BAK:
 	  cursor_rel (-1, 0);

-glenn

-- 
 )      Glenn Spell <glenn AT gs DOT fay DOT nc DOT us>      )   _       _____
 )   Fayetteville, North Carolina, U. S. A.   )_ (__\____o /_/_ |
 )     _  _  _  _  _  _  _  _  _  _  _  _     )   >-----._/_/__]>
 )--- Cygwin - Don't leave Unix without it ---)             `0  |

- Raw text -


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