[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/exwm ba536bb 1/4: Delay closing minibuffer
From: |
Chris Feng |
Subject: |
[elpa] externals/exwm ba536bb 1/4: Delay closing minibuffer |
Date: |
Wed, 28 Oct 2015 11:00:35 +0000 |
branch: externals/exwm
commit ba536bb6e354577cd69926865aee0e6f90f7306a
Author: Chris Feng <address@hidden>
Commit: Chris Feng <address@hidden>
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.
---
exwm-workspace.el | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 8000b0b..d1fe6cf 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -139,7 +139,8 @@ The optional FORCE option is for internal use only."
y (/ h 2)))
(set-mouse-pixel-position frame x y)))
;; 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)
;; Hide windows in other workspaces by preprending a space
(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)
(when (and index (/= index exwm-workspace-current-index))
(exwm--log "Workspace was switched unexpectedly")
- ;; Close the (possible) active minibuffer
- (when (active-minibuffer-window) (abort-recursive-edit))
(exwm-workspace-switch index)))))
;;;###autoload