[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r113230: Don't call sit-for in right-char and left-c
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r113230: Don't call sit-for in right-char and left-char for visual cursor motion. |
Date: |
Sun, 30 Jun 2013 14:50:43 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 113230
revision-id: address@hidden
parent: address@hidden
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sun 2013-06-30 17:49:33 +0300
message:
Don't call sit-for in right-char and left-char for visual cursor motion.
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.
modified:
lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432
lisp/bindings.el
bindings.el-20091113204419-o5vbwnq5f7feedwu-1013
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/xdisp.c xdisp.c-20091113204419-o5vbwnq5f7feedwu-240
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-06-30 14:27:07 +0000
+++ b/lisp/ChangeLog 2013-06-30 14:49:33 +0000
@@ -1,5 +1,9 @@
2013-06-30 Eli Zaretskii <address@hidden>
+ * 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)
=== modified file 'lisp/bindings.el'
--- a/lisp/bindings.el 2013-06-29 15:20:46 +0000
+++ b/lisp/bindings.el 2013-06-30 14:49:33 +0000
@@ -725,8 +725,7 @@
(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 @@
(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))))
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-06-29 20:19:29 +0000
+++ b/src/ChangeLog 2013-06-30 14:49:33 +0000
@@ -1,3 +1,10 @@
+2013-06-30 Eli Zaretskii <address@hidden>
+
+ * 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 <address@hidden>
Fix minor problems found by static checking.
=== modified file 'src/xdisp.c'
--- a/src/xdisp.c 2013-06-29 15:52:20 +0000
+++ b/src/xdisp.c 2013-06-30 14:49:33 +0000
@@ -20107,6 +20107,7 @@
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 @@
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 @@
SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1);
else
break;
+ w->cursor.vpos = -1;
return make_number (PT);
}
}
@@ -20161,6 +20164,7 @@
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 @@
SET_PT (ZV);
else
continue;
+ w->cursor.vpos = -1;
return make_number (PT);
}
}
@@ -20197,6 +20202,7 @@
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 @@
SET_PT (ZV);
else
continue;
+ w->cursor.vpos = -1;
return make_number (PT);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r113230: Don't call sit-for in right-char and left-char for visual cursor motion.,
Eli Zaretskii <=