GNU bug report logs - #13446
24.2; Fix loop test in linum.el

Previous Next

Package: emacs;

Reported by: Nathan Trapuzzano <nbtrap <at> nbtrap.com>

Date: Tue, 15 Jan 2013 01:15:01 UTC

Severity: normal

Found in version 24.2

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Nathan Trapuzzano <nbtrap <at> nbtrap.com>
Cc: 13446 <at> debbugs.gnu.org
Subject: bug#13446: 24.2; Fix loop test in linum.el
Date: Sun, 27 Oct 2013 09:39:41 -0400
> 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.


        Stefan




This bug report was last modified 11 years and 268 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.