zdharma-continuum / fast-syntax-highlighting

Feature-rich syntax highlighting for ZSH
BSD 3-Clause "New" or "Revised" License
1.2k stars 76 forks source link

[bug]: Plugin breaks option-delete behavior on iterm #71

Open kfernandez31 opened 2 months ago

kfernandez31 commented 2 months ago

Describe the bug

Hi,

I'd love to use this plugin over zsh-users/zsh-syntax-highlighting but can't because of the broken behavior for option-delete on iTerm. Namely, by setting the key combination to send 0x17 or 0x1b 0x7f (enabled with the "Natural Text Editing" preset) one can perform "intelligent backward delete word" which will delete all characters after the first word delimiter encountered to the left. This is particularly useful for deleting parts of file paths.

Steps to reproduce

  1. Run option+delete with the "Natural Text Editing" and the plugin enabled with zinit light zdharma-continuum/fast-syntax-highlighting on the string foo/bar/baz . The whole path gets deleted.

Expected behavior

  1. Do the same but without the plugin. Obtain foo/bar/.

Screenshots and recordings

No response

Operating System & Version

darwin23.0 | apple | x86_64 | arm64 | arm64 arm

Zsh version

zsh 5.9 (x86_64-apple-darwin23.0)

Terminal emulator

xterm-256color

If using WSL on Windows, which version of WSL

None

Additional context

These don't affect anything but still including them:

zinit light zsh-users/zsh-history-substring-search
zinit light zsh-users/zsh-autosuggestions
zinit light zsh-users/zsh-completions
kfernandez31 commented 2 months ago

Manually adding a bindkey to my .zshrc that'd set the key combination to send eg. 0x17 does not fix the issue.