diff options
| author | Eli Zaretskii | 2022-07-22 22:22:08 +0300 |
|---|---|---|
| committer | Eli Zaretskii | 2022-07-22 22:22:08 +0300 |
| commit | 304e2a3a05feee6578aadfa0228dde734fe850cf (patch) | |
| tree | 8998467b004b2bf1f8d624205a2b14c3def11b10 /src | |
| parent | 874e2525035d45efa6fa374a2ebec3740ecc1457 (diff) | |
| download | emacs-304e2a3a05feee6578aadfa0228dde734fe850cf.tar.gz emacs-304e2a3a05feee6578aadfa0228dde734fe850cf.zip | |
Avoid assertion violations in 'handle_fontified_prop'
* src/xdisp.c (handle_fontified_prop): Avoid assertion violations
due to automatic narrowing. (Bug#56682)
Diffstat (limited to 'src')
| -rw-r--r-- | src/xdisp.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/xdisp.c b/src/xdisp.c index caa421c2818..215a6d561ea 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4395,6 +4395,11 @@ handle_fontified_prop (struct it *it) | |||
| 4395 | bool old_clip_changed = current_buffer->clip_changed; | 4395 | bool old_clip_changed = current_buffer->clip_changed; |
| 4396 | bool saved_inhibit_flag = it->f->inhibit_clear_image_cache; | 4396 | bool saved_inhibit_flag = it->f->inhibit_clear_image_cache; |
| 4397 | 4397 | ||
| 4398 | val = Vfontification_functions; | ||
| 4399 | specbind (Qfontification_functions, Qnil); | ||
| 4400 | |||
| 4401 | eassert (it->end_charpos == ZV); | ||
| 4402 | |||
| 4398 | if (it->narrowed_begv) | 4403 | if (it->narrowed_begv) |
| 4399 | { | 4404 | { |
| 4400 | record_unwind_protect (unwind_narrowed_begv, Fpoint_min ()); | 4405 | record_unwind_protect (unwind_narrowed_begv, Fpoint_min ()); |
| @@ -4404,11 +4409,6 @@ handle_fontified_prop (struct it *it) | |||
| 4404 | specbind (Qinhibit_widen, Qt); | 4409 | specbind (Qinhibit_widen, Qt); |
| 4405 | } | 4410 | } |
| 4406 | 4411 | ||
| 4407 | val = Vfontification_functions; | ||
| 4408 | specbind (Qfontification_functions, Qnil); | ||
| 4409 | |||
| 4410 | eassert (it->end_charpos == ZV); | ||
| 4411 | |||
| 4412 | /* Don't allow Lisp that runs from 'fontification-functions' | 4412 | /* Don't allow Lisp that runs from 'fontification-functions' |
| 4413 | clear our face and image caches behind our back. */ | 4413 | clear our face and image caches behind our back. */ |
| 4414 | it->f->inhibit_clear_image_cache = true; | 4414 | it->f->inhibit_clear_image_cache = true; |