[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: mode-line size and position indicator
From: |
Nick Helm |
Subject: |
Re: mode-line size and position indicator |
Date: |
Fri, 25 Aug 2017 21:57:35 +1200 |
User-agent: |
mu4e 0.9.18; emacs 25.2.1 |
Thanks for your comments Eli.
On Fri 25 Aug 2017 at 4.55 am, Eli Zaretskii wrote:
> ...there's a fundamental problem with putting on the mode line an
> indicator that must use a significant part of the screen estate to be
> useful: the mode line is pretty crowded these days, even in the
> default configuration.
Agreed, especially when we already have scroll-bars. Still, something
like this might be useful in a few corner cases – users do seem to keep
reinventing it in one form or another over and over again. See John
Yate's comment down thread for one recent example. Even nyan-mode
qualifies, I guess. :)
> I wonder whether it would have made sense to reuse the code we have
> for computing the scroll-bar thumb.
Almost certainly. I'll check it out.
> Also, why two different code fragments? why not use the former for
> both small and large values of 'total'?
Other parts of xdisp.c seem to warn against overflow when dealing with
large buffers ('total' more than 1000000). Although I couldn't
reproduce any problems when I was playing around with the code, I
thought it was prudent to follow the same kinds of precautions.
In the other case, I wanted the code to run quickly during rapid
scrolling manoeuvres, so I tried to condense the math as much as
possible at the cost of dealing with larger variables. That was the idea
anyway.
Thanks again,
Nick