From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13446: 24.2; Fix loop test in linum.el Date: Sun, 27 Oct 2013 09:39:41 -0400 Message-ID: References: <87y5fvp7ti.fsf@nbtrap.com> <874n85cqxj.fsf@nbtrap.com> <87y55fapz8.fsf@nbtrap.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1382881279 22813 80.91.229.3 (27 Oct 2013 13:41:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 27 Oct 2013 13:41:19 +0000 (UTC) Cc: 13446@debbugs.gnu.org To: Nathan Trapuzzano Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 27 14:41:22 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VaQan-0002Qc-6c for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2013 14:41:21 +0100 Original-Received: from localhost ([::1]:37806 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaQam-0005uY-O6 for geb-bug-gnu-emacs@m.gmane.org; Sun, 27 Oct 2013 09:41:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaQac-0005uS-VA for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 09:41:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VaQaV-00065h-HF for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 09:41:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:33399) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VaQaV-00065d-DT for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 09:41:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VaQaU-0001B8-LC for bug-gnu-emacs@gnu.org; Sun, 27 Oct 2013 09:41:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 27 Oct 2013 13:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13446 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13446-submit@debbugs.gnu.org id=B13446.13828812074459 (code B ref 13446); Sun, 27 Oct 2013 13:41:02 +0000 Original-Received: (at 13446) by debbugs.gnu.org; 27 Oct 2013 13:40:07 +0000 Original-Received: from localhost ([127.0.0.1]:47418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaQZZ-00019q-Kq for submit@debbugs.gnu.org; Sun, 27 Oct 2013 09:40:06 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:50261) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VaQZU-00019B-J6 for 13446@debbugs.gnu.org; Sun, 27 Oct 2013 09:40:00 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFsoXua/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IPAS-Result: Av4EABK/CFFsoXua/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtkQoDpHqBXoMT X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="36449654" Original-Received: from 108-161-123-154.dsl.teksavvy.com (HELO pastel.home) ([108.161.123.154]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 27 Oct 2013 09:39:53 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 2355D60460; Sun, 27 Oct 2013 09:39:41 -0400 (EDT) In-Reply-To: <87y55fapz8.fsf@nbtrap.com> (Nathan Trapuzzano's message of "Sun, 27 Oct 2013 07:54:35 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:79693 Archived-At: > 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