]> git.eshelyaron.com Git - emacs.git/commitdiff
Yet another place inside redisplay_window to prevent quitting
authorEli Zaretskii <eliz@gnu.org>
Wed, 18 Aug 2021 13:14:29 +0000 (16:14 +0300)
committerEli Zaretskii <eliz@gnu.org>
Wed, 18 Aug 2021 13:14:29 +0000 (16:14 +0300)
* src/xdisp.c (handle_single_display_spec): Inhibit quitting
around the call to lookup_image.  (Bug#44448)

src/xdisp.c

index ceb0fa7e64d9d7c8ed0453120a07a743334ad172..ada9ed6c22bb02a3071b3d381c2d03a363e3f253 100644 (file)
@@ -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;