about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChris Feng <chris.w.feng@gmail.com>2020-03-29T00·00+0000
committerChris Feng <chris.w.feng@gmail.com>2020-03-29T00·00+0000
commit5f9ba9772f483729c479c316d456fa87888c062f (patch)
treef610cc1888891c763185210d033e2553b2389e7c
parented0f63327dbfa7ef2ebe1dc37bfc38d40d531c29 (diff)
Additional fix for winner-mode
* exwm-input.el (exwm-input--on-KeyPress-line-mode): Check incomplete
key presses (which generate no valid events) before running
`pre-command-hook' and `post-command-hook'.
-rw-r--r--exwm-input.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/exwm-input.el b/exwm-input.el
index 82ce82a4e748..a891710da263 100644
--- a/exwm-input.el
+++ b/exwm-input.el
@@ -688,9 +688,10 @@ Current buffer must be an `exwm-mode' buffer."
               (set-transient-map `(keymap (t . ,#'exwm-input--noop)))
               (exwm-input--unread-event event))
           ;; Fool some packages into thinking there is a change in the buffer.
-          (setq last-command #'exwm-input--noop)
-          (run-hooks 'pre-command-hook)
-          (run-hooks 'post-command-hook)))
+          (when event
+            (setq last-command #'exwm-input--noop)
+            (run-hooks 'pre-command-hook)
+            (run-hooks 'post-command-hook))))
       (xcb:+request exwm--connection
           (make-instance 'xcb:AllowEvents
                          :mode mode