bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#13108: 24.3.50; previous-line sometimes moves up two lines instead o


From: Eli Zaretskii
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

> 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 via email to

[Prev in Thread] Current Thread [Next in Thread]