mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
(redisplay_window): When restoring original buffer position, make sure
it is still valid.
This commit is contained in:
parent
675bab4470
commit
bc04f6bf4f
1 changed files with 4 additions and 1 deletions
|
|
@ -13520,7 +13520,10 @@ redisplay_window (window, just_this_one_p)
|
|||
/* Restore current_buffer and value of point in it. */
|
||||
TEMP_SET_PT_BOTH (CHARPOS (opoint), BYTEPOS (opoint));
|
||||
set_buffer_internal_1 (old);
|
||||
TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint));
|
||||
/* Avoid an abort in TEMP_SET_PT_BOTH if the buffer has become
|
||||
shorter. This can be caused by log truncation in *Messages*. */
|
||||
if (CHARPOS (lpoint) <= ZV)
|
||||
TEMP_SET_PT_BOTH (CHARPOS (lpoint), BYTEPOS (lpoint));
|
||||
|
||||
unbind_to (count, Qnil);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue