all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alp Aker <alptekin.aker@gmail.com>
Cc: ami@fischman.org, vineet naik <vineet.naik@kodeplay.com>,
	13108@debbugs.gnu.org
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	[thread overview]
Message-ID: <831uf1op3w.fsf@gnu.org> (raw)
In-Reply-To: <CACxch4pQtuYHTayVwL2F6i3qanmfud6cLeffL6N0T-VgHNXFVA@mail.gmail.com>

> Date: Fri, 7 Dec 2012 02:32:24 -0500
> From: Alp Aker <alptekin.aker@gmail.com>
> Cc: 13108@debbugs.gnu.org, Eli Zaretskii <eliz@gnu.org>
> 
> > 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 <eliz@gnu.org>
> 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')






  reply	other threads:[~2012-12-07 15:31 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06 23:08 bug#13108: 24.3.50; previous-line sometimes moves up two lines instead of just one Ami Fischman
2012-12-07  7:32 ` Alp Aker
2012-12-07 15:31   ` Eli Zaretskii [this message]
2012-12-07 18:58     ` Ami Fischman
2012-12-07 19:09       ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=831uf1op3w.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=13108@debbugs.gnu.org \
    --cc=alptekin.aker@gmail.com \
    --cc=ami@fischman.org \
    --cc=vineet.naik@kodeplay.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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.