[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hydra 8a9124f80b 27/35: hydra.el: Fix hydra-curr-map ni
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hydra 8a9124f80b 27/35: hydra.el: Fix hydra-curr-map nil when hydras are nested via :post |
Date: |
Tue, 25 Oct 2022 22:59:06 -0400 (EDT) |
branch: externals/hydra
commit 8a9124f80b6919ad5288172b3e9f46c5332763ca
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
hydra.el: Fix hydra-curr-map nil when hydras are nested via :post
The :post handler is called by el:hydra-keyboard-quit, which calls
el:hydra-disable, and
then sets el:hydra-curr-map to nil.
This is fine if there's only one hydra. However, for nesting hydras like
yours this
happens:
- hydra-b sets el:hydra-curr-map to map-b
- el:hydra-keyboard-quit calls the :post handler and sets it to map-a
- el:hydra-keyboard-quit then sets it to nil
The fix is to set `hydra-curr-map' in `hydra-disable' before :post is
called.
Fixes #375
---
hydra.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hydra.el b/hydra.el
index afdf0f5c34..5fad230bfa 100644
--- a/hydra.el
+++ b/hydra.el
@@ -159,6 +159,7 @@ warn: keep KEYMAP and issue a warning instead of running
the command."
(with-selected-frame frame
(when overriding-terminal-local-map
(internal-pop-keymap hydra-curr-map 'overriding-terminal-local-map))))
+ (setq hydra-curr-map nil)
(unless hydra--ignore
(when hydra-curr-on-exit
(let ((on-exit hydra-curr-on-exit))
@@ -526,7 +527,6 @@ Remove :color key. And sort the plist alphabetically."
(hydra-disable)
(cancel-timer hydra-timeout-timer)
(cancel-timer hydra-message-timer)
- (setq hydra-curr-map nil)
(unless (and hydra--ignore
(null hydra--work-around-dedicated))
(funcall
- [elpa] externals/hydra 87873d7888 26/35: Explicitly require cl-lib., (continued)
- [elpa] externals/hydra 87873d7888 26/35: Explicitly require cl-lib., ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 798c0d810f 05/35: .github/FUNDING.yml: Add, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 74b32f3ff0 10/35: lv.el: Sience byte compiler, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra d2b921d067 22/35: hydra.el (defhydra): :exit key can now also be a sexp, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra a38690b1b7 32/35: Add GNU ELPA badge, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 112e689f75 28/35: hydra.el (hydra-add-imenu): Add, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 9e9e00cb24 33/35: hydra.el (hydra--doc): Don't quote nil in generated docstrings, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 406988f6e9 02/35: hydra.el (hydra-posframe-show-params): Add, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra bcc2d0eb5b 15/35: hydra.el (hydra--work-around-dedicated): Revert, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 6442faf3da 20/35: hydra.el (hydra--make-defun): Refactor, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 8a9124f80b 27/35: hydra.el: Fix hydra-curr-map nil when hydras are nested via :post,
ELPA Syncer <=
- [elpa] externals/hydra e3e3d2c17f 35/35: Merge remote-tracking branch 'refs/remotes/upstream/hydra/main' into elpa--merge/hydra, ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 435c55e9f7 08/35: Disable fill-column-indicator display., ELPA Syncer, 2022/10/25
- [elpa] externals/hydra 9fc28a044b 21/35: hydra.el (hydra--make-defun): Refactor, ELPA Syncer, 2022/10/25