From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Nathan Trapuzzano <nbtrap@nbtrap.com>
Cc: 13446@debbugs.gnu.org
Subject: bug#13446: 24.2; Fix loop test in linum.el
Date: Sun, 27 Oct 2013 09:39:41 -0400 [thread overview]
Message-ID: <jwvtxg2on2v.fsf-monnier+emacsbugs@gnu.org> (raw)
In-Reply-To: <87y55fapz8.fsf@nbtrap.com> (Nathan Trapuzzano's message of "Sun, 27 Oct 2013 07:54:35 -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
next prev parent reply other threads:[~2013-10-27 13:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 1:13 bug#13446: 24.2; Fix loop test in linum.el Nathan Trapuzzano
2013-10-25 15:26 ` Nathan Trapuzzano
2013-10-27 4:20 ` Stefan Monnier
2013-10-27 11:54 ` Nathan Trapuzzano
2013-10-27 13:39 ` Stefan Monnier [this message]
2013-10-27 19:36 ` Nathan Trapuzzano
2013-10-28 0:36 ` Stefan Monnier
-- strict thread matches above, loose matches on Subject: below --
2013-01-15 5:36 bug#13454: 24.2; Small fix to reference manual Nathan Trapuzzano
2013-10-26 21:44 ` bug#13446: 24.2; Fix loop test in linum.el Nathan Trapuzzano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvtxg2on2v.fsf-monnier+emacsbugs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=13446@debbugs.gnu.org \
--cc=nbtrap@nbtrap.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).