mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-05 11:45:45 +00:00
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)
This commit is contained in:
parent
e4b73abd38
commit
3e39897cd0
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user