mirror of
https://github.com/ch11ng/exwm.git
synced 2024-11-23 19:47:58 +01:00
Fix for "Selecting deleted buffer" exception
This commit is contained in:
parent
3edf2e8880
commit
93d96757b6
1 changed files with 7 additions and 15 deletions
|
@ -405,21 +405,13 @@ manager is shutting down."
|
||||||
(xcb:flush exwm--connection))
|
(xcb:flush exwm--connection))
|
||||||
(let ((kill-buffer-func
|
(let ((kill-buffer-func
|
||||||
(lambda (buffer)
|
(lambda (buffer)
|
||||||
(with-current-buffer buffer
|
(let ((kill-buffer-query-functions nil))
|
||||||
(let ((kill-buffer-query-functions nil)
|
(when exwm--floating-frame
|
||||||
(floating exwm--floating-frame))
|
(select-window
|
||||||
(kill-buffer)
|
(frame-selected-window exwm-workspace--current)))
|
||||||
(when floating
|
(kill-buffer buffer)))))
|
||||||
(select-window
|
(run-with-idle-timer 0 nil kill-buffer-func buffer)
|
||||||
(frame-selected-window exwm-workspace--current))))))))
|
(when (active-minibuffer-window)
|
||||||
(if (not (active-minibuffer-window))
|
|
||||||
;; Kill the buffer as usual.
|
|
||||||
(funcall kill-buffer-func buffer)
|
|
||||||
;; This can happen when this buffer was requested to be killed
|
|
||||||
;; from the minibuffer (e.g. with `ido-kill-buffer-at-head').
|
|
||||||
;; We have to exit the minibuffer first or there'll be a
|
|
||||||
;; "selecting deleted buffer" error.
|
|
||||||
(run-with-idle-timer 0 nil kill-buffer-func buffer)
|
|
||||||
(exit-minibuffer))))))
|
(exit-minibuffer))))))
|
||||||
|
|
||||||
(defun exwm-manage--scan ()
|
(defun exwm-manage--scan ()
|
||||||
|
|
Loading…
Reference in a new issue