From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nathan Trapuzzano Newsgroups: gmane.emacs.bugs Subject: bug#13446: 24.2; Fix loop test in linum.el Date: Mon, 14 Jan 2013 20:13:13 -0500 Message-ID: <87y5fvp7ti.fsf@nbtrap.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1358212480 32010 80.91.229.3 (15 Jan 2013 01:14:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 15 Jan 2013 01:14:40 +0000 (UTC) To: 13446@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 15 02:14:58 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 1Tuv7C-0004sX-6h for geb-bug-gnu-emacs@m.gmane.org; Tue, 15 Jan 2013 02:14:58 +0100 Original-Received: from localhost ([::1]:57061 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuv6v-0004Sp-M6 for geb-bug-gnu-emacs@m.gmane.org; Mon, 14 Jan 2013 20:14:41 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuv6s-0004Sg-2y for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 20:14:40 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tuv6p-0006sw-LA for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 20:14:38 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55052) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuv6p-0006sk-Gz for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 20:14:35 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tuv7F-0002jm-Qw for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 20:15:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Nathan Trapuzzano Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 15 Jan 2013 01:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13446 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135821245810452 (code B ref -1); Tue, 15 Jan 2013 01:15:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 15 Jan 2013 01:14:18 +0000 Original-Received: from localhost ([127.0.0.1]:60515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tuv6X-0002iW-Jd for submit@debbugs.gnu.org; Mon, 14 Jan 2013 20:14:17 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38157) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tuv6U-0002iP-P3 for submit@debbugs.gnu.org; Mon, 14 Jan 2013 20:14:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tuv61-0006XQ-EY for submit@debbugs.gnu.org; Mon, 14 Jan 2013 20:13:48 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:38382) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuv61-0006XM-Bm for submit@debbugs.gnu.org; Mon, 14 Jan 2013 20:13:45 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tuv5y-0004P5-CD for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 20:13:45 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tuv5v-0006Vp-PB for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 20:13:42 -0500 Original-Received: from oproxy9.bluehost.com ([69.89.24.6]:50056) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1Tuv5v-0006VX-F2 for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 20:13:39 -0500 Original-Received: (qmail 5038 invoked by uid 0); 15 Jan 2013 01:13:15 -0000 Original-Received: from unknown (HELO host393.hostmonster.com) (66.147.240.193) by oproxy9.bluehost.com with SMTP; 15 Jan 2013 01:13:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nbtrap.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:Subject:To:From; bh=cBCSS3ka0QN+ewZGbuqoYVtDUUlTEsf6A9aOidzyPwg=; b=UCzxdsuOfXTAbsYylAH3fNlYHWvm2SSHqijws6YUErCVXI3R0psqF/lo+v/5liUw9zxQP5onlEp0m0UVi4Vwf8f77ZIMsA2Wksl/KBMUrRVn1WTZVRjCsfHz9Q6NsonP; Original-Received: from [76.240.203.247] (port=58418 helo=Nathan-GNU) by host393.hostmonster.com with esmtpsa (TLSv1:CAMELLIA128-SHA:128) (Exim 4.80) (envelope-from ) id 1Tuv5X-0004M7-8h for bug-gnu-emacs@gnu.org; Mon, 14 Jan 2013 18:13:15 -0700 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Identified-User: {1585:host393.hostmonster.com:nbtrapco:nbtrap.com} {sentby:smtp auth 76.240.203.247 authed with nbtrap@nbtrap.com} X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:69785 Archived-At: --=-=-= Content-Type: text/plain There is an incorrect loop test in linum.el that potentially applies an overlay to a line not visible in the window and thereby messes up the width of the overlays in the lines that are visible. The patch/merge directive is attached, and what follows is the commit message: ----- Modify loop test in `linum-update-window'. `limit' is set to the position returned by `window-end'; this position is either on the last visible (logical) line in the buffer or is the first position on the line following the last visible line. In the former case, the loop variable never reaches the value of `limit', but in the latter case, an overlay is applied to a line that is not visible in the window. This can mess up the width of the overlay on the visible lines, especially if the width of the line number (as a string) of the line that's not visible is different from the width of the visible lines' line numbers. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=linum.patch # Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: nbtrap@nbtrap.com-20130115010121-h7kwjyr5kimowgml # target_branch: . # testament_sha1: a9154d3ede2b389220646bb8e9e708117d876d01 # timestamp: 2013-01-14 20:03:26 -0500 # base_revision_id: nbtrap@nbtrap.com-20130111013646-pn4xh5r94x5asomb # # Begin patch === modified file 'lisp/linum.el' --- lisp/linum.el 2012-01-19 07:21:25 +0000 +++ lisp/linum.el 2013-01-15 00:45:27 +0000 @@ -151,7 +151,7 @@ (run-hooks 'linum-before-numbering-hook) ;; Create an overlay (or reuse an existing one) for each ;; line visible in this window, if necessary. - (while (and (not (eobp)) (<= (point) limit)) + (while (and (not (eobp)) (< (point) limit)) (let* ((str (if fmt (propertize (format fmt line) 'face 'linum) (funcall linum-format line))) # Begin bundle IyBCYXphYXIgcmV2aXNpb24gYnVuZGxlIHY0CiMKQlpoOTFBWSZTWdjgvvgAABJfgAAQQGFxUBIA AACv794QIABkRTaajamQyGjTaRiFGgBMBBkwQhDmaVnH5r9hMFQyJ7EUzThiw4Ixc/mQVpexbPS2 9yLLTxaFbWvXcN2zcydOQxpD652acQC4g4Z96jI5BipgKAAiM5Zz45Kd/4u5IpwoSGxwX3wA --=-=-=--