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

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

Re: size of the slider bar


From: David Reitter
Subject: Re: size of the slider bar
Date: Tue, 27 Dec 2005 16:18:21 +0100

On 25 Dec 2005, at 20:06, Richard M. Stallman wrote:

      The length of the slider bar, the blue bar that slides inside
the scroll bar track (I'm not sure about the terminology) changes
randomly as you scroll up and down the text. I'm sure you know that
the ratio of the length of this bar to the total length of the scroll
bar must represent the ratio between the number of lines in the window
to the number of lines in the file.

That would take too long, for large files; he would not like this either,
but he has not realized this would be the price of what he wants.

I'm aware of that and I told him so.

The current situation isn't as bad as it was (Carbon port), so I don't think it's a pressing problem right now (but in the long run).

For Emacs 23, you may want to consider one of the following solutions:

1) Keep an index with line numbers for every 5000th character in a buffer and use the index to get a good approximate translation from char-position to line number (or char-position to pixel height count, i.e. lines x char-height) by using the index and counting the remaining few lines. The index could be updated through one mean or the other, but it's enough to keep it approximately right. This solution is likely to make sense if the slider size isn't the only thing it's good for.

2) Do not change the slider size WHILE it is being dragged, because that is confusing from an UI point of view. I think it would be less confusing to adapt it AFTER dragging.

I'm sorry I can't implement either of them lacking knowledge about Emacs internals and time.



reply via email to

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