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

fast-syntax-highlighting warning: "zsh-syntax-highlighting: unhandled ZLE widget 'reverse-yank-pop'" #24

Open
edentsai opened this issue Dec 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@edentsai
Copy link

edentsai commented Dec 28, 2023

Describe the bug

When enable plugins zsh-edit and fast-syntax-highlighting together, fast-syntax-highlight will display a warning about reverse-yank-pop:

zsh-syntax-highlighting: unhandled ZLE widget 'reverse-yank-pop'

I figured out this warning message is caused by doing bindkey <keys> reverse-yank-pop without creating the 'reverse-yank-pop' widget with zle -N or zle -C.), it can be fixed by add the following line:

  # File: https://github.com/marlonrichert/zsh-edit/blob/9eb286982f96f03371488e910e42afb23802bdfd/functions/zsh-edit#L108-L109
  bindkey -M emacs  '^[/' redo \
                    '^[Y' reverse-yank-pop
+ zle -N reverse-yank-pop .edit.visual-yank

I saw zsh-edit-precmd() will handle zle -N reverse-yank-pop .edit.visual-yank,
but it may must be executed before the plugin fast-syntax-highlighting is loaded.

Steps To Reproduce

Just install these two plugins with Oh My Zsh:

plugins=("fast-syntax-highlighting" "zsh-edit")
source "${HOME}/.oh-my-zsh/oh-my-zsh.sh"

Expected behavior

No warning message.

Observed behavior

Click to expand

Environment:

  • OS: macOS 14.2.1
  • Terminal: iTerm2
  • Zsh version: 5.9
  • Repo version: zsh-edit 113a0d5

Additional context

None

@edentsai edentsai added the bug Something isn't working label Dec 28, 2023
@edentsai edentsai changed the title fast-syntax-highlight warning: "zsh-syntax-highlighting: unhandled ZLE widget 'reverse-yank-pop'" fast-syntax-highlighting warning: "zsh-syntax-highlighting: unhandled ZLE widget 'reverse-yank-pop'" Dec 28, 2023
Riatre added a commit to Riatre/zsh-edit that referenced this issue Aug 24, 2024
See marlonrichert#24.
I don't know if this is the correct fix but it get rid of the error
message and I don't use reverse-yank-pop anyways so all good.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant