From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#13108: 24.3.50; previous-line sometimes moves up two lines instead of just one Date: Fri, 07 Dec 2012 17:31:47 +0200 Message-ID: <831uf1op3w.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1354894380 3196 80.91.229.3 (7 Dec 2012 15:33:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Dec 2012 15:33:00 +0000 (UTC) Cc: ami@fischman.org, vineet naik , 13108@debbugs.gnu.org To: Alp Aker Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 07 16:33:12 2012 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 1TgzvI-0007xM-5v for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Dec 2012 16:33:08 +0100 Original-Received: from localhost ([::1]:54396 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tgzv5-0002zG-UE for geb-bug-gnu-emacs@m.gmane.org; Fri, 07 Dec 2012 10:32:55 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:47992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tgzv0-0002yp-5e for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 10:32:54 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tgzut-0005V8-Nx for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 10:32:50 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:48796) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tgzut-0005V3-KL for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 10:32:43 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1TgzvC-00049t-DT for bug-gnu-emacs@gnu.org; Fri, 07 Dec 2012 10:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 07 Dec 2012 15:33:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13108 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 13108-submit@debbugs.gnu.org id=B13108.135489435015937 (code B ref 13108); Fri, 07 Dec 2012 15:33:02 +0000 Original-Received: (at 13108) by debbugs.gnu.org; 7 Dec 2012 15:32:30 +0000 Original-Received: from localhost ([127.0.0.1]:59044 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgzuf-00048z-W2 for submit@debbugs.gnu.org; Fri, 07 Dec 2012 10:32:30 -0500 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:62008) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tgzuc-00048m-UG for 13108@debbugs.gnu.org; Fri, 07 Dec 2012 10:32:28 -0500 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MEO002002X4WI00@a-mtaout21.012.net.il> for 13108@debbugs.gnu.org; Fri, 07 Dec 2012 17:32:05 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MEO0026U35HNGB0@a-mtaout21.012.net.il>; Fri, 07 Dec 2012 17:32:05 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il 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:68107 Archived-At: > Date: Fri, 7 Dec 2012 02:32:24 -0500 > From: Alp Aker > Cc: 13108@debbugs.gnu.org, Eli Zaretskii > > > Repro recipe: > > > > gmacs -Q > > M-x linum-mode RET (in the *Scratch* buffer) > > ctrl-p (moves up one line; yay) > > ctrl-p (moves up two lines; boo!) > > It seems to be due to the below commit. > > revno: 110764.1.170 > fixes bug: http://debbugs.gnu.org/12930 > committer: Eli Zaretskii > branch nick: emacs-24 > timestamp: Wed 2012-11-21 21:28:14 +0200 > message: > Fix bug #12930 with vertical-motion through a display string. > > src/indent.c (Fvertical_motion): If the starting position is covered > by a display string, return to one position before that, to avoid > overshooting it inside move_it_to. Yes, sorry about that. Fixed in revision 111007 on the emacs-24 branch. Patch below, if you cannot wait for the next merge to the trunk. === modified file 'src/indent.c' --- src/indent.c 2012-11-21 19:28:14 +0000 +++ src/indent.c 2012-12-07 15:28:20 +0000 @@ -2034,7 +2034,11 @@ whether or not it is currently displayed const char *s = SSDATA (it.string); const char *e = s + SBYTES (it.string); - disp_string_at_start_p = it.string_from_display_prop_p; + /* If it.area is anything but TEXT_AREA, we need not bother + about the display string, as it doesn't affect cursor + positioning. */ + disp_string_at_start_p = + it.string_from_display_prop_p && it.area == TEXT_AREA; while (s < e) { if (*s++ == '\n')