From xemacs-m  Tue Jan  7 19:22:32 1997
Received: from xemacs.cs.uiuc.edu (localhost [127.0.0.1])
          by xemacs.cs.uiuc.edu (8.8.4/8.8.4) with ESMTP
	  id TAA07173; Tue, 7 Jan 1997 19:22:32 -0600 (CST)
Message-Id: <199701080122.TAA07173@xemacs.cs.uiuc.edu>
To: greg@alphatech.com
cc: xemacs-beta@xemacs.org (XEmacs beta list)
Subject: Re: scrollbars 
In-reply-to: Your message of "Tue, 07 Jan 1997 19:35:56 EST."
             <9701080035.AA12973@euler.alphatech.com> 
Date: Tue, 07 Jan 1997 19:22:31 -0600
From: Chuck Thompson <cthomp@xemacs.org>

    Greg> Something that's always bugged me is that it seems the size
    Greg> of the scrollbar and the scrolling are based on character
    Greg> positions instead of lines.

Emacs / XEmacs is not a line based editor.  Period.  If it was
scrollbars would have never been anything but line based in the first
place.  Probably.

It is actually fairly easily to implement (at first look) if you
either don't care about performance or run XEmacs on a Cray.  It is
not quite as trivial as it looks at a glance since they should really
be based on the number of display lines, not the number of newlines.
With variable height lines and variable width characters that becomes
difficult to do.  Something like the Motif text widget is easy.  Keep
a running count of the number of lines and an additional counter which
is incremented for each line wrap which is always easily calculatable
since it is always caused by the same number of characters.




			-Chuck

