1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-01 03:33:28 -07:00

Avoid assertion violations in 'handle_fontified_prop'

* src/xdisp.c (handle_fontified_prop): Avoid assertion violations
due to automatic narrowing.  (Bug#56682)
This commit is contained in:
Eli Zaretskii 2022-07-22 22:22:08 +03:00
parent 874e252503
commit 304e2a3a05

View file

@ -4395,6 +4395,11 @@ handle_fontified_prop (struct it *it)
bool old_clip_changed = current_buffer->clip_changed;
bool saved_inhibit_flag = it->f->inhibit_clear_image_cache;
val = Vfontification_functions;
specbind (Qfontification_functions, Qnil);
eassert (it->end_charpos == ZV);
if (it->narrowed_begv)
{
record_unwind_protect (unwind_narrowed_begv, Fpoint_min ());
@ -4404,11 +4409,6 @@ handle_fontified_prop (struct it *it)
specbind (Qinhibit_widen, Qt);
}
val = Vfontification_functions;
specbind (Qfontification_functions, Qnil);
eassert (it->end_charpos == ZV);
/* Don't allow Lisp that runs from 'fontification-functions'
clear our face and image caches behind our back. */
it->f->inhibit_clear_image_cache = true;