]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't call sit-for in right-char and left-char for visual cursor motion.
authorEli Zaretskii <eliz@gnu.org>
Sun, 30 Jun 2013 14:49:33 +0000 (17:49 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sun, 30 Jun 2013 14:49:33 +0000 (17:49 +0300)
 src/xdisp.c (Fmove_point_visually): Invalidate the cursor position
 when moving point by using the current glyph matrix.  This avoids
 the need to force redisplay when this function is called in a
 loop.

 lisp/bindings.el (right-char, left-char): Don't call sit-for, this is
 no longer needed.  Use arithmetic comparison only for numerical
 arguments.

lisp/ChangeLog
lisp/bindings.el
src/ChangeLog
src/xdisp.c

index 283b948a2db20e829d0a4c4b81c5ec3124dfe417..c9582b1c81ba2ba567034e3100faf60350d4c1bd 100644 (file)
@@ -1,5 +1,9 @@
 2013-06-30  Eli Zaretskii  <eliz@gnu.org>
 
+       * bindings.el (right-char, left-char): Don't call sit-for, this is
+       no longer needed.  Use arithmetic comparison only for numerical
+       arguments.
+
        * international/mule-cmds.el (select-safe-coding-system): Handle
        the case of FROM being a string correctly.  (Bug#14755)
 
index a3aef3244bc88b80ee537e9ead96655cbbff985f..005e43b3059a6ec8e91e1c64bd62f2fd52aee7f3 100644 (file)
@@ -725,8 +725,7 @@ see."
   (interactive "^p")
   (if visual-order-cursor-movement
       (dotimes (i (if (numberp n) (abs n) 1))
-       (move-point-visually (if (< n 0) -1 1))
-       (sit-for 0))
+       (move-point-visually (if (and (numberp n) (< n 0)) -1 1)))
     (if (eq (current-bidi-paragraph-direction) 'left-to-right)
        (forward-char n)
       (backward-char n))))
@@ -744,8 +743,7 @@ see."
   (interactive "^p")
   (if visual-order-cursor-movement
       (dotimes (i (if (numberp n) (abs n) 1))
-       (move-point-visually (if (< n 0) 1 -1))
-       (sit-for 0))
+       (move-point-visually (if (and (numberp n) (< n 0)) 1 -1)))
     (if (eq (current-bidi-paragraph-direction) 'left-to-right)
        (backward-char n)
       (forward-char n))))
index 2f1c553576f55e68a8c86752452fa8ee012be1aa..f10e1070fa3eaf82f18bec4fc382be64dc330af4 100644 (file)
@@ -1,3 +1,10 @@
+2013-06-30  Eli Zaretskii  <eliz@gnu.org>
+
+       * xdisp.c (Fmove_point_visually): Invalidate the cursor position
+       when moving point by using the current glyph matrix.  This avoids
+       the need to force redisplay when this function is called in a
+       loop.
+
 2013-06-29  Paul Eggert  <eggert@cs.ucla.edu>
 
        Fix minor problems found by static checking.
index 963553e10cc65598a1ccb22c783a381638630fac..660c6b9130f92d2127252f24c7a5ae5615708ab4 100644 (file)
@@ -20107,6 +20107,7 @@ Value is the new character position of point.  */)
          if (BUFFERP (g->object) && g->charpos != PT)
            {
              SET_PT (g->charpos);
+             w->cursor.vpos = -1;
              return make_number (PT);
            }
          else if (!INTEGERP (g->object) && g->object != gpt->object)
@@ -20126,6 +20127,7 @@ Value is the new character position of point.  */)
              else
                break;
              SET_PT (new_pos);
+             w->cursor.vpos = -1;
              return make_number (PT);
            }
          else if (ROW_GLYPH_NEWLINE_P (row, g))
@@ -20141,6 +20143,7 @@ Value is the new character position of point.  */)
                SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1);
              else
                break;
+             w->cursor.vpos = -1;
              return make_number (PT);
            }
        }
@@ -20161,6 +20164,7 @@ Value is the new character position of point.  */)
              if (row->reversed_p && !row->continued_p)
                {
                  SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1);
+                 w->cursor.vpos = -1;
                  return make_number (PT);
                }
              g = row->glyphs[TEXT_AREA];
@@ -20188,6 +20192,7 @@ Value is the new character position of point.  */)
                        SET_PT (ZV);
                      else
                        continue;
+                     w->cursor.vpos = -1;
                      return make_number (PT);
                    }
                }
@@ -20197,6 +20202,7 @@ Value is the new character position of point.  */)
              if (!row->reversed_p && !row->continued_p)
                {
                  SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1);
+                 w->cursor.vpos = -1;
                  return make_number (PT);
                }
              e = row->glyphs[TEXT_AREA];
@@ -20224,6 +20230,7 @@ Value is the new character position of point.  */)
                        SET_PT (ZV);
                      else
                        continue;
+                     w->cursor.vpos = -1;
                      return make_number (PT);
                    }
                }