Don't check whether a deleted window is deletable (Bug#54028)
* lisp/window.el (window-state-put): Make sure window is live before calling 'window-deletable-p' on it (Bug#54028).
This commit is contained in:
parent
b38223a844
commit
68d134cf0f
1 changed files with 5 additions and 1 deletions
|
@ -6410,7 +6410,11 @@ windows can get as small as `window-safe-min-height' and
|
||||||
(window--state-put-2 ignore pixelwise))
|
(window--state-put-2 ignore pixelwise))
|
||||||
(while window-state-put-stale-windows
|
(while window-state-put-stale-windows
|
||||||
(let ((window (pop window-state-put-stale-windows)))
|
(let ((window (pop window-state-put-stale-windows)))
|
||||||
(when (eq (window-deletable-p window) t)
|
;; Avoid that 'window-deletable-p' throws an error if window
|
||||||
|
;; was already deleted when exiting 'with-temp-buffer' above
|
||||||
|
;; (Bug#54028).
|
||||||
|
(when (and (window-valid-p window)
|
||||||
|
(eq (window-deletable-p window) t))
|
||||||
(delete-window window))))
|
(delete-window window))))
|
||||||
(window--check frame))))
|
(window--check frame))))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue