emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/emacs-24 r110934: Fix bug #12930 with verti


From: Eli Zaretskii
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-24 r110934: Fix bug #12930 with vertical-motion through a display string.
Date: Wed, 21 Nov 2012 21:28:14 +0200
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110934
fixes bug: http://debbugs.gnu.org/12930
committer: Eli Zaretskii <address@hidden>
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.
modified:
  src/ChangeLog
  src/indent.c
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog     2012-11-20 19:28:53 +0000
+++ b/src/ChangeLog     2012-11-21 19:28:14 +0000
@@ -1,3 +1,9 @@
+2012-11-21  Eli Zaretskii  <address@hidden>
+
+       * 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.  (Bug#12930)
+
 2012-11-20  Daniel Colascione  <address@hidden>
 
        * w32fns.c (Fx_file_dialog):

=== modified file 'src/indent.c'
--- a/src/indent.c      2012-10-16 07:56:44 +0000
+++ b/src/indent.c      2012-11-21 19:28:14 +0000
@@ -2057,7 +2057,13 @@
           comment said this is "so we don't move too far" (2005-01-19
           checkin by kfs).  But this does nothing useful that I can
           tell, and it causes Bug#2694 .  -- cyd */
-       move_it_to (&it, PT, -1, -1, -1, MOVE_TO_POS);
+       /* When the position we started from is covered by a display
+          string, move_it_to will overshoot it, while vertical-motion
+          wants to put the cursor _before_ the display string.  So in
+          that case, we move to buffer position before the display
+          string, and avoid overshooting.  */
+       move_it_to (&it, disp_string_at_start_p ? PT - 1 : PT,
+                   -1, -1, -1, MOVE_TO_POS);
 
       /* IT may move too far if truncate-lines is on and PT lies
         beyond the right margin.  IT may also move too far if the


reply via email to

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