emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/dape cc89cc26c0 3/5: Skip updating non visible info buf


From: ELPA Syncer
Subject: [elpa] externals/dape cc89cc26c0 3/5: Skip updating non visible info buffers
Date: Fri, 16 Feb 2024 18:57:46 -0500 (EST)

branch: externals/dape
commit cc89cc26c049a614287ea748b4db1043ca6aaf37
Author: Daniel Pettersson <daniel@dpettersson.net>
Commit: Daniel Pettersson <daniel@dpettersson.net>

    Skip updating non visible info buffers
    
    As the `window-buffer-change-functions' hook function takes care of
    updating when the buffer is showing, there is really no need in
    fetching those other buffers.
---
 dape.el | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/dape.el b/dape.el
index d2897fd3ab..3a87422632 100644
--- a/dape.el
+++ b/dape.el
@@ -2831,10 +2831,11 @@ If SKIP-UPDATE is non nil skip updating buffer 
contents."
 (defun dape-info-update (&optional conn)
   "Update and display `dape-info-*' buffers for adapter CONN."
   (dolist (buffer (dape--info-buffer-list))
-    (dape--info-update (or conn
-                           (dape--live-connection 'stopped t)
-                           (dape--live-connection 'newest t))
-                       buffer)))
+    (when (get-buffer-window buffer)
+      (dape--info-update (or conn
+                             (dape--live-connection 'stopped t)
+                             (dape--live-connection 'newest t))
+                         buffer))))
 
 (defun dape-info (&optional maybe-kill kill)
   "Update and display *dape-info* buffers.



reply via email to

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