From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id FAA01354 for ; Thu, 18 Jul 1996 05:02:31 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id OAA20587; Wed, 17 Jul 1996 14:57:43 -0400 (EDT) Resent-Date: Wed, 17 Jul 1996 14:57:43 -0400 (EDT) From: Zefram Message-Id: <15917.199607171856@stone.dcs.warwick.ac.uk> Subject: Re: ZLE scrolly bugfix To: mason@werple.net.au (Geoff Wing) Date: Wed, 17 Jul 1996 19:56:36 +0100 (BST) Cc: zsh-workers@math.gatech.edu, A.Main@dcs.warwick.ac.uk In-Reply-To: <199607171838.SAA00748@werple.net.au> from "Geoff Wing" at Jul 18, 96 04:38:38 am X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]7823.94 X-US-Congress: Moronic fuckers MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"HrTMc3.0.b15.cUJxn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1687 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >Yep, these are bugs. However the patch doesn't fix these properly. >In nextline, if nvln == winh - 1 (or --ln as you put it), then >you would still need to scroll one line and adjust nvln. That's exactly what the patch does, unless I'm misunderstanding you. The patched code reads: if (++ln == winh) \ ! if (nvln != --ln && nvln != -1) \ break; \ ! else { \ ln = scrollwindow(0); \ + if(nvln != -1) \ + nvln -= winh - ln; \ + } \ The changed behaviour is that if we've reached the end of the screen, we scroll UNLESS the cursor position is on screen (nvln != -1) AND it's not on the last line (nvln != --ln). It's that last part that's changed -- previously it only scrolled if the cursor position wasn't yet on screen. The adjustment of nvln is also new -- previously it just wasn't required, as we could never scroll with the cursor position on screen. Actaully, knowing how it works, that patch looks trivially simple. Not much to show for an hour's hacking. >I was thinking about breaking up scrollwindow() into scroll a single >line and scroll a half screen. Not necessary. The single scrolling function is perfectly adequate -- the code that calls it has no need to know how much it will scroll by. >And for Zoltan and others who want to use zed to edit their stuff >and want half window scrolls, chuck "local BAUD=2400" at the top >somewhere. Other refresh styles will have to wait till after zsh 3.0 I have to say, single-line scrolling at 9600 baud isn't great. But it's good to have the choice. Anyway, for 3.1 I'd rather like `lazy' scrolling -- only scroll when the cursor is moved to the top or bottom of the screen. We already have this for SINGLE_LINE_ZLE, though of course it's much simpler there. It would mean some fairly radical changes to some of the refresh code, so it's probably not a good idea right now. -zefram