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

Macros that do line indenting with < or > fails with 'Invalid macro' #3538

Closed
bcspragu opened this issue Aug 25, 2022 · 1 comment · Fixed by #3556
Closed

Macros that do line indenting with < or > fails with 'Invalid macro' #3538

bcspragu opened this issue Aug 25, 2022 · 1 comment · Fixed by #3556
Labels
C-bug Category: This is a bug

Comments

@bcspragu
Copy link
Contributor

Summary

Recording a macro that contains a < or > indenting action fails with Invalid macro: Unmatched '>' or Invalid macro: '>' expected

Reproduction Steps

I tried this:

  1. hx
  2. Add some text
  3. Q>Q, e.g. record a macro that indents
  4. Try running it with q, you'll get the above error

asciicast

I expected this to happen: The macro should run. In the example case, this means indenting the line again when pressing q

Instead, this happened: The aforementioned error occurred.

Helix log

There wasn't any interesting output in the logs

Platform

Linux

Terminal Emulator

st 0.8.4

Helix Version

helix 22.05 (0a22148) (e.g. basically HEAD)

@bcspragu bcspragu added the C-bug Category: This is a bug label Aug 25, 2022
@Omnikar
Copy link
Contributor

Omnikar commented Aug 25, 2022

This is because < and > are used as delimiters of multicharacter key names in macros (e.g. <esc>). <lt> and <gt> already exist to represent < and >, but we need to make sure those keypresses are actually recorded as such in order to fix this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants