emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master ee812f2: Yet another place inside redisplay_window to prevent qui


From: Eli Zaretskii
Subject: master ee812f2: Yet another place inside redisplay_window to prevent quitting
Date: Wed, 18 Aug 2021 09:15:47 -0400 (EDT)

branch: master
commit ee812f2a987d295659c041c577aac8db93de819f
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Yet another place inside redisplay_window to prevent quitting
    
    * src/xdisp.c (handle_single_display_spec): Inhibit quitting
    around the call to lookup_image.  (Bug#44448)
---
 src/xdisp.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/xdisp.c b/src/xdisp.c
index ceb0fa7..ada9ed6 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -5788,8 +5788,15 @@ handle_single_display_spec (struct it *it, Lisp_Object 
spec, Lisp_Object object,
 #ifdef HAVE_WINDOW_SYSTEM
       else
        {
+         ptrdiff_t count = SPECPDL_INDEX ();
+
          it->what = IT_IMAGE;
+         /* Don't allow quitting from lookup_image, for when we are
+            displaying a non-selected window, and the buffer's point
+            was temporarily moved to the window-point.  */
+         specbind (Qinhibit_quit, Qt);
          it->image_id = lookup_image (it->f, value, it->face_id);
+         unbind_to (count, Qnil);
          it->position = start_pos;
          it->object = NILP (object) ? it->w->contents : object;
          it->method = GET_FROM_IMAGE;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]