Skip to content
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

Add a shim for Macrostep. #637

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Add a shim for Macrostep. #637

merged 1 commit into from
Sep 20, 2024

Conversation

okamsn
Copy link
Contributor

@okamsn okamsn commented Sep 18, 2024

Macrostep shows macro expansions using overlays either in a separate buffer or at the location where the macro is used. In the overlay, it binds a local map to further expand or collapse macros.

This change takes inspiration for the Beacon state and checks whether point is inside one of the overlays in post-command-hook. However, at least one of the commands to collapse the overlay does not seem to trigger post-command-hook, so switching back to the previous state is also done during macrostep-mode-hook.

macrostep was mentioned in #503 by @jgarte. I am pinging them in case they have thoughts on this shim.

@eshrh
Copy link
Member

eshrh commented Sep 18, 2024

looks good. do you want to wait for @jgarte or are you ready for merge?

@jgarte
Copy link
Contributor

jgarte commented Sep 18, 2024

If you've tested it and it works well then LGTM :)

Macrostep shows macro expansions using overlays either in a separate buffer or at
the location where the macro is used.  In the overlay, it binds a local map to
further expand or collapse macros.

This change takes inspiration for the Beacon state and checks whether point is
inside one of the overlays in `post-command-hook`.  However, at least one of the
commands to collapse the overlay does not seem to trigger `post-command-hook`,
so switching back to the previous state is also done during
`macrostep-mode-hook`.
@okamsn
Copy link
Contributor Author

okamsn commented Sep 20, 2024

I had overlooked keypad state when switching to motion state. That part is fixed. However, the shim won't work with any other states that work like Keypad state, because it switches back to Motion state while in the overlay before the Keypad key sequence is completed. I'm not sure how to handle that case.

Other than that, I think it's good now.

@eshrh eshrh merged commit bba7aa9 into meow-edit:master Sep 20, 2024
3 checks passed
@jgarte
Copy link
Contributor

jgarte commented Sep 20, 2024

@okamsn Thanks for your contribution. I appreciate this feature add.

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

Successfully merging this pull request may close these issues.

3 participants