[Top][All Lists]

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

bug#13446: 24.2; Fix loop test in linum.el

From: Stefan Monnier
Subject: bug#13446: 24.2; Fix loop test in linum.el
Date: Sun, 27 Oct 2013 09:39:41 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> not empty.)  Notice now that the margin for line numbers is three
> characters wide--large enough to hold "100", even though line 100 is not
> actually in the window.  This is caused by linum overlaying line 100,
> which it shouldn't be doing.  My patch fixes this.

Ah, got it!
Thank you, it makes perfect sense now,

BTW, in nlinum-mode, the default behavior is half-way between the two:
we don't try to accommodate the largest line number there can be
(partly to avoid scanning the whole buffer, which can be a performance
problem in itself), so we grow the margin only when we display a larger
number, but we don't shrink it back when moving back to the beginning of
the file with shorter line numbers.  The main reason was that I found it
annoying to have the margin grow&shrink all the time in those cases
where you're working right around line 100 or 1000.


reply via email to

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