jeffreytse / zsh-vi-mode

💻 A better and friendly vi(vim) mode plugin for ZSH.
MIT License
3.31k stars 113 forks source link

zsh-autosuggestions highlighting has error #258

Open Songggggr opened 11 months ago

Songggggr commented 11 months ago

If you delete with ctrl + u, it will reproduce image image

tummetott commented 10 months ago

same here. took me a while to find out that this is cause by this plugin. please fix

Note: it only happens for the first cmd when opening a new shell

tummetott commented 10 months ago

A workaround is to disable lazy loading by defining this variable before sourcing the pluing:

ZVM_INIT_MODE=sourcing

However, this can introduce other side effects, such as the need to source ZVM after oh-my-zsh for it to work.

Songggggr commented 10 months ago

@tummetott It doesn't work, It can be repeated every time

jeffreytse commented 10 months ago

@Songggggr I'd love to dig this issue. Could you please provide much more details as issue template? Thank you.

tummetott commented 10 months ago

@tummetott It doesn't work, It can be repeated every time

I mean the bug only exists when opening a new shell, typing something that has an autocompletion, canceling the line with C-u. Once you press ENTER for any cmd (can also be an empty cmd), then the bug is gone.

Songggggr commented 10 months ago

@tummetott It doesn't work, It can be repeated every time

I mean the bug only exists when opening a new shell, typing something that has an autocompletion, canceling the line with C-u. Once you press ENTER for any cmd (can also be an empty cmd), then the bug is gone.

Yes, press ENTER or reinput then the bug is gone. But repeated trigger autocomplete and Ctrl+u appearing again. @jeffreytse