emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 61e399f 22/39: Add and use which-key--automatic-display


From: Justin Burkett
Subject: [elpa] master 61e399f 22/39: Add and use which-key--automatic-display
Date: Thu, 21 Jun 2018 15:48:16 -0400 (EDT)

branch: master
commit 61e399f75f7ea90f9dfbd1407730e685b7e3f17d
Author: Justin Burkett <address@hidden>
Commit: Justin Burkett <address@hidden>

    Add and use which-key--automatic-display
---
 which-key.el | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/which-key.el b/which-key.el
index ca1aa25..038c468 100644
--- a/which-key.el
+++ b/which-key.el
@@ -639,6 +639,9 @@ Used when `which-key-popup-type' is frame.")
 (defvar which-key--last-try-2-loc nil
   "Internal: Last location of side-window when two locations
 used.")
+(defvar which-key--automatic-display nil
+  "Internal: Non-nil if popup was triggered with automatic
+update.")
 (defvar which-key--multiple-locations nil)
 (defvar which-key--using-top-level nil)
 (defvar which-key--using-show-keymap nil)
@@ -1061,6 +1064,7 @@ total height."
   "This function is called to hide the which-key buffer."
   (unless (member real-this-command which-key--paging-functions)
     (setq which-key--current-prefix nil
+          which-key--automatic-display nil
           which-key--using-top-level nil
           which-key--using-show-keymap nil
           which-key--using-show-operator-keymap nil
@@ -2534,6 +2538,7 @@ Finally, show the buffer."
                                        (key-description prefix-keys)
                                        (length prefix-keys))))
                           (sit-for delay-time)))
+             (setq which-key--automatic-display t)
              (which-key--create-buffer-and-show prefix-keys)
              (when (and which-key-idle-secondary-delay
                         (not which-key--secondary-timer-active))
@@ -2550,9 +2555,7 @@ Finally, show the buffer."
                 (eq evil-state 'operator)
                 (not which-key--using-show-operator-keymap))
            (which-key--show-evil-operator-keymap))
-          ((and (not which-key--using-top-level)
-                (not which-key--using-show-operator-keymap)
-                (not which-key--using-show-keymap))
+          (which-key--automatic-display
            (which-key--hide-popup)))))
 
 ;;; Timers



reply via email to

[Prev in Thread] Current Thread [Next in Thread]