]> git.eshelyaron.com Git - emacs.git/commitdiff
Speed up animation of non-displayed buffers
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 3 May 2021 09:51:53 +0000 (11:51 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 3 May 2021 09:51:53 +0000 (11:51 +0200)
* lisp/image.el (image-show-frame): Don't force an update if the
buffer with the animation isn't in a window (bug#47895).  Also
just update the window in question.

lisp/image.el

index 5e84536b669a2ee93b983c88598b813c3364331c..643f9ddf83415f45c1a6efdabbc5df8f77cca754 100644 (file)
@@ -875,7 +875,9 @@ do not check N is within the range of frames present in the image."
       (setq n (min n (1- (car (plist-get (cdr image)
                                          :animate-multi-frame-data)))))))
   (plist-put (cdr image) :index n)
-  (force-window-update))
+  (when-let ((window
+              (get-buffer-window (plist-get (cdr image) :animate-buffer) t)))
+    (force-window-update window)))
 
 (defun image-animate-get-speed (image)
   "Return the speed factor for animating IMAGE."