mirror of
https://github.com/emacs-exwm/exwm.git
synced 2024-11-23 21:17:59 +01:00
Delay closing minibuffer
* exwm-workspace.el (exwm-workspace-switch, exwm-workspace--on-focus-in): Delay closing minibuffer until Emacs is idle. This prevent nonlocal exits from interrupting remaining code.
This commit is contained in:
parent
d05df51b05
commit
ba536bb6e3
1 changed files with 2 additions and 3 deletions
|
@ -139,7 +139,8 @@ The optional FORCE option is for internal use only."
|
||||||
y (/ h 2)))
|
y (/ h 2)))
|
||||||
(set-mouse-pixel-position frame x y)))
|
(set-mouse-pixel-position frame x y)))
|
||||||
;; Close the (possible) active minibuffer
|
;; Close the (possible) active minibuffer
|
||||||
(when (active-minibuffer-window) (abort-recursive-edit))
|
(when (active-minibuffer-window)
|
||||||
|
(run-with-idle-timer 0 nil (lambda () (abort-recursive-edit))))
|
||||||
(setq default-minibuffer-frame frame)
|
(setq default-minibuffer-frame frame)
|
||||||
;; Hide windows in other workspaces by preprending a space
|
;; Hide windows in other workspaces by preprending a space
|
||||||
(unless exwm-workspace-show-all-buffers
|
(unless exwm-workspace-show-all-buffers
|
||||||
|
@ -168,8 +169,6 @@ The optional FORCE option is for internal use only."
|
||||||
(exwm--log "Focus on workspace %s" index)
|
(exwm--log "Focus on workspace %s" index)
|
||||||
(when (and index (/= index exwm-workspace-current-index))
|
(when (and index (/= index exwm-workspace-current-index))
|
||||||
(exwm--log "Workspace was switched unexpectedly")
|
(exwm--log "Workspace was switched unexpectedly")
|
||||||
;; Close the (possible) active minibuffer
|
|
||||||
(when (active-minibuffer-window) (abort-recursive-edit))
|
|
||||||
(exwm-workspace-switch index)))))
|
(exwm-workspace-switch index)))))
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
|
|
Loading…
Reference in a new issue