emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scrollbars ?


From: Kim F. Storm
Subject: Re: Scrollbars ?
Date: Tue, 30 May 2006 14:41:02 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

address@hidden (Michaël Cadilhac) writes:

>> Emacs adjusts the size of the scroll bar handle to reflect the
>> percentage of the buffer text which is visible in the current window.
>> The calculation is based on number of characters rather than lines, so
>> the handle changes size quite dramatically as you scroll if you have a
>> mixture of lots of empty lines and long lines.
>
> That's weird and pretty unexpected. What's the rational?

Internally, Emacs works on characters, not lines.
So it doesn't know how many lines there are in a buffer.

And in principle, it doesn't even know what line the cursor is at (but
the mode-line display can include the line number, so it has to COUNT
newlines from the start of the buffer to find out).

It has been argued that it may take too long to calculate the necessary
information, and thus slow down redisplay.

Perhaps we could do it "line based" for buffers less than, say 20K
(make it a config option), and char based otherwise (in which case,
people will probably not notice anyway).

Anyway, this is not the time...


-- 
Kim F. Storm <address@hidden> http://www.cua.dk





reply via email to

[Prev in Thread] Current Thread [Next in Thread]