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

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

bug#64851: 30.0.50; mode-line right align and vertical scroll-bars


From: Eli Zaretskii
Subject: bug#64851: 30.0.50; mode-line right align and vertical scroll-bars
Date: Tue, 25 Jul 2023 16:39:40 +0300

> From: German Pacenza <germanp82@hotmail.com>
> Date: Tue, 25 Jul 2023 08:06:11 -0300
> 
> 
> emacs -Q:
> (scroll-bar-mode 0)
> (setq-default mode-line-format '(""
>                                  mode-line-format-right-align
>                                  mode-line-position))
> Visit a very large file like xdisp.c and move to eob.
> The line number get truncated.

Personally, I think the only reasonable response to this report is
"Don't do that".  The value of mode-line-position accounts only for 4
digits in the line number (it uses min-width 5.0, with one character
taken up by the leading "L"), and that is insufficient for buffers
larger that 9999 lines.  So if this is what you want, i.e. you want
mode-line-position to be the last part of the mode line, you need to
redefine mode-line-position to support more digits in the line number.

There seems to be an off-by-one error in the alignment computed by
mode--line-format-right-align, though, because adding one more space
to mode-line-position is insufficient to show the full 5 digits of
xdisp.c's line numbers: one needs two extra place, not one.  I hope
Hugo (CC'ed) will be able to find this minor mistake.

Thanks.





reply via email to

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