branch: externals/which-key
commit 8d934c571fb954232c4cbe6f1dab554a35ad5e7d
Author: Justin Burkett <[email protected]>
Commit: Justin Burkett <[email protected]>

    Don't allow transient maps when prefix length is zero.
    
    Fixes #335
---
 which-key.el | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/which-key.el b/which-key.el
index c13f4af25a..d2743198fa 100644
--- a/which-key.el
+++ b/which-key.el
@@ -2655,6 +2655,9 @@ Finally, show the buffer."
                         (not which-key--secondary-timer-active))
                (which-key--start-timer which-key-idle-secondary-delay t))))
           ((and which-key-show-transient-maps
+                ;; Assuming that if this is not true we're in
+                ;; `which-key-show-top-level', which would then be overwritten.
+                (> (length prefix-keys) 0)
                 (keymapp overriding-terminal-local-map)
                 ;; basic test for it being a hydra
                 (not (eq (lookup-key overriding-terminal-local-map "\C-u")

Reply via email to