-
-
Notifications
You must be signed in to change notification settings - Fork 118
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
ZVM_MODE mismatch & escape sequences no longer working #309
Comments
I was able to reproduce this in iTerm, Ghostty, and Kitty, so I do not think this is anything related to Ghostty (I know it's still new on the scene). I also did not start with inserting text into the buffer after getting "stuck" in normal mode in my recording, but that's how I initially figured out I was in insert rather than normal mode. Also, here's my functions in my
|
After some further testing & reconfiguration, I am able to achieve Expected Behavior Option 2: revert to insert at the exit of previous command, regardless of the last mode state prior to execution, by changing the value of the following:
Using the For my use case, always defaulting to insert mode works just fine. The default configuration does move to normal mode after command exit as I mentioned in Case 1 of the expected behavior; however, I can't quite piece together why I can insert when |
General information
Basic examination
Problem description
Using a vanilla install, no custom keybinds or anything special, just sourcing via the homebrew steps on the README and a few prompt re-drawings to work with oh-my-posh. If I execute a command while remaining in normal mode (example steps below), the prompt temporarily reflects insert, then overrides to "normal" (the last mode), even though I am still in "insert" mode. In addition, this state is not escapable with any escape mappings (
Esc
orCtrl+[
), and is only fixed by re-initializing the shell via something likeexec zsh
or quitting my terminal emulator & restarting. Screen recording below:zsh-vi-mode-bug-repo.mov
I think this is related to the usage of
ZVM_MODE_LAST
in theZVM_LINE_INIT_MODE
here, but I have not had a moment to investigate in detail given I have a workaround (just making sure I am in insert mode prior to executing any command 😄 ).Reproduction steps
Expected behavior
I'd expect one of two behaviors:
ZVM_MODE
value retains the last mode and that mode is actually what the user is in (e.g. if normal, then normal keybinds should work, not the insert ones)ZVM_MODE
value is overwritten to insert after each command executes (technically after the previous command exits, I suppose).The text was updated successfully, but these errors were encountered: