8000 hydra-pause-resume doesn't work from hydra-base-map · Issue #427 · abo-abo/hydra · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
8000

hydra-pause-resume doesn't work from hydra-base-map #427

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
dadinn opened this issue Feb 10, 2025 · 0 comments
Open

hydra-pause-resume doesn't work from hydra-base-map #427

dadinn opened this issue Feb 10, 2025 · 0 comments

Comments

@dadinn
Copy link
dadinn commented Feb 10, 2025

I have the following code to demonstrate the problem:

(use-package hydra
  :init
  (defun hydra-pause-only ()
    (interactive)
    (hydra-pause-resume)
    (message "Paused hydra."))
  (defhydra scale-window-hydra nil
    "Scale current window"
    ("," shrink-window-horizontally "shrink horizontal")
    ("." enlarge-window-horizontally "enlarge horizontal")
    ("<" shrink-window "shrink vertical")
    (">" enlarge-window "enlarge vertical")
    ("%" balance-windows "balance"))
  :bind
  ("C-x C-," . scale-window-hydra/shrink-window-horizontally)
  ("C-x C-." . scale-window-hydra/enlarge-window-horizontally)
  ("C-x C-<" . scale-window-hydra/shrink-window)
  ("C-x C->" . scale-window-hydra/enlarge-window)
  ("C-x C-%" . scale-window-hydra/balance-windows)
  ("C-:" . hydra-pause-resume)
  (:map hydra-base-map
   (":" . hydra-pause-only)))

I expect that hydra-pause-only wrapper would print the "Paused hydra." message, when pressing C-: from inside the hydra (which I can enter into via those scale-window-hydra global bindings. Meanwhile pressing C-: from outside the hydra would resume the last used hydra from the stack.

The problem is that when pressing C-: while inside the hydra instead does not print anything, and just exits the hydra. This IMHO implies that the binding in hydra-base-map does not actually register, and the hydra just interprets it as foreign-key, and exits. I am able to resume the hydra after though, so not 100% sure what is going on.

NOTE: the weird binding choices are due to me using god-mode on Dvorak layout. ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant
0