zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: mason@werple.net.au (Geoff Wing)
Cc: zsh-workers@math.gatech.edu, A.Main@dcs.warwick.ac.uk
Subject: Re: ZLE scrolly bugfix
Date: Wed, 17 Jul 1996 19:56:36 +0100 (BST)	[thread overview]
Message-ID: <15917.199607171856@stone.dcs.warwick.ac.uk> (raw)
In-Reply-To: <199607171838.SAA00748@werple.net.au> from "Geoff Wing" at Jul 18, 96 04:38:38 am

>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



  reply	other threads:[~1996-07-17 19:02 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-17 11:17 Zefram
1996-07-17 18:38 ` Geoff Wing
1996-07-17 18:56   ` Zefram [this message]
1996-07-18  9:20     ` Geoff Wing

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15917.199607171856@stone.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=mason@werple.net.au \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).