about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAdrián Medraño Calvo <adrian@medranocalvo.com>2018-11-03T12·00+0000
committerAdrián Medraño Calvo <adrian@medranocalvo.com>2018-11-03T12·00+0000
commit0dd909a11baf3d7d766c1672d726eb59b1474ef2 (patch)
treeb81486865287a6af7c136d0e850f073913f1a747
parentdbccda22a6b6e32a9e547954ec660ad8e80b7416 (diff)
Stop hiding the minibuffer when a message is being displayed
* exwm-workspace.el (exwm-workspace--echo-area-maybe-clear): New
function that postpones hiding the minibuffer when it's displaying
a message.
(exwm-workspace--on-echo-area-dirty): Use it.
-rw-r--r--exwm-workspace.el13
1 files changed, 12 insertions, 1 deletions
diff --git a/exwm-workspace.el b/exwm-workspace.el
index 383bf530b8a6..0f0d10c36762 100644
--- a/exwm-workspace.el
+++ b/exwm-workspace.el
@@ -1203,7 +1203,18 @@ Please check `exwm-workspace--minibuffer-own-frame-p' first."
                 input-method-use-echo-area)
       (setq exwm-workspace--display-echo-area-timer
             (run-with-timer exwm-workspace-display-echo-area-timeout nil
-                            #'exwm-workspace--on-echo-area-clear)))))
+                            #'exwm-workspace--echo-area-maybe-clear)))))
+
+(defun exwm-workspace--echo-area-maybe-clear ()
+  "Eventually clear the echo area container."
+  (exwm--log)
+  (if (not (current-message))
+      (exwm-workspace--on-echo-area-clear)
+    ;; Reschedule.
+    (cancel-timer exwm-workspace--display-echo-area-timer)
+    (setq exwm-workspace--display-echo-area-timer
+          (run-with-timer exwm-workspace-display-echo-area-timeout nil
+                          #'exwm-workspace--echo-area-maybe-clear))))
 
 (defun exwm-workspace--on-echo-area-clear ()
   "Run in echo-area-clear-hook to hide echo area container."