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

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

[elpa] externals/bufferlo 82f51c31ab 23/37: desktop.el support: Fix erro


From: ELPA Syncer
Subject: [elpa] externals/bufferlo 82f51c31ab 23/37: desktop.el support: Fix error on deleted windows
Date: Sun, 5 Nov 2023 09:57:33 -0500 (EST)

branch: externals/bufferlo
commit 82f51c31abbea862653c454c72640d233692d113
Author: Florian Rommel <mail@florommel.de>
Commit: Florian Rommel <mail@florommel.de>

    desktop.el support: Fix error on deleted windows
    
    During `desktop-read', windows with non-existing buffers get deleted.
    Ignore these windows.
---
 bufferlo.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/bufferlo.el b/bufferlo.el
index 9d44c9f8e5..38f045b42d 100644
--- a/bufferlo.el
+++ b/bufferlo.el
@@ -316,7 +316,11 @@ Ignore buffers that are not able to be persisted in the 
desktop file."
 (defun bufferlo--window-state-put (state &optional window ignore)
   "Restore the frame's buffer-list from the window state."
   (ignore ignore)
-  (when bufferlo--desktop-advice-active
+  ;; We have to make sure that the window is live at this point.
+  ;; `frameset-restore' may pass a window with a non-existing buffer
+  ;; to `window-state-put', which in turn will delete that window
+  ;; before the advice calls us.
+  (when (and bufferlo--desktop-advice-active (window-live-p window))
     ;; FIXME: Currently there is no distinction between buffers and
     ;;        buried buffers for dektop.el.
     (let ((bl (car (cdr (assq 'bufferlo-buffer-list state)))))



reply via email to

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