GNU bug report logs -
#13108
24.3.50; previous-line sometimes moves up two lines instead of just one
Previous Next
Reported by: Ami Fischman <ami <at> fischman.org>
Date: Thu, 6 Dec 2012 23:10:01 UTC
Severity: normal
Merged with 13111
Found in version 24.3.50
Done: Eli Zaretskii <eliz <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
> Date: Fri, 7 Dec 2012 02:32:24 -0500
> From: Alp Aker <alptekin.aker <at> gmail.com>
> Cc: 13108 <at> debbugs.gnu.org, Eli Zaretskii <eliz <at> 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 <at> 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')
This bug report was last modified 12 years and 169 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.