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

REGION_ACTIVE and command word relative precedence #928

Open
blueray453 opened this issue Jun 1, 2023 · 2 comments
Open

REGION_ACTIVE and command word relative precedence #928

blueray453 opened this issue Jun 1, 2023 · 2 comments

Comments

@blueray453
Copy link

The following code does not work if I use zsh-syntax-highlighting

_ctrl-a() {
  MARK=0
  CURSOR=$#BUFFER
  REGION_ACTIVE=1
}

zle -N _ctrl-a
bindkey '^A' _ctrl-a # Ctrl+A

When i press ctrl+a it should select the whole buffer but, if i use this extension, it miss first word of every line.

issue

More details in the comment section of https://unix.stackexchange.com/a/747753/206574

@phy1729
Copy link
Member

phy1729 commented Jul 23, 2023

I can't reproduce this on zsh 5.9 and z-sy-h 1386f12.

@danielshahaf
Copy link
Member

Using edit-command-line might be a useful workaround, depends on what you're trying to do.

Also, I'll be retitling this in a minute. What your screenshot shows is that the special parameters do get honoured, but the command word highlighting rule overrides them.

@danielshahaf danielshahaf changed the title Bug: Can not use some zle variables in other widgets REGION_ACTIVE and command word relative precedence Jul 24, 2023
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

3 participants