[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs-26 3e39897: Avoid assertion violation under visual-o
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs-26 3e39897: Avoid assertion violation under visual-order-cursor-movement |
Date: |
Tue, 13 Mar 2018 12:01:42 -0400 (EDT) |
branch: emacs-26
commit 3e39897cd03a10b5d1ac75a89f999943e3dad5c0
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Avoid assertion violation under visual-order-cursor-movement
* src/xdisp.c (Fmove_point_visually): Don't let point exceed the
BEGV..ZV range. Signal Beginning of buffer error when there's a
before-string at BEGV. (Bug#30787)
---
src/xdisp.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/xdisp.c b/src/xdisp.c
index b003a2f..fb6729c 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -22430,6 +22430,11 @@ Value is the new character position of point. */)
new_pos += (row->reversed_p ? -dir : dir);
else
new_pos -= (row->reversed_p ? -dir : dir);
+ new_pos = clip_to_bounds (BEGV, new_pos, ZV);
+ /* If we didn't move, we've hit BEGV or ZV, so we
+ need to signal a suitable error. */
+ if (new_pos == PT)
+ break;
}
else if (BUFFERP (g->object))
new_pos = g->charpos;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] emacs-26 3e39897: Avoid assertion violation under visual-order-cursor-movement,
Eli Zaretskii <=