Skip to content

Commit

Permalink
fix: incorrect ZVM_MODE value after initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffreytse committed Sep 22, 2023
1 parent fb2f825 commit c8ca1a1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions zsh-vi-mode.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3601,6 +3601,12 @@ function zvm_init() {
# Since normally '^?' (backspace) is bound to vi-backward-delete-char
zvm_bindkey viins '^?' backward-delete-char

# Initialize ZVM_MODE value
case $ZVM_LINE_INIT_MODE in
$ZVM_MODE_INSERT) ZVM_MODE=$ZVM_MODE_INSERT;;
*) ZVM_MODE=$ZVM_MODE_NORMAL;;
esac

# Enable vi keymap
bindkey -v

Expand Down

3 comments on commit c8ca1a1

@VeryDampTowel
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffreytse
this commit is causing new shell sessions to start in normal mode rather than insert mode.
Switching $ZVM_MODE_INSERT and $ZVM_MODE_NORMAL resolves the issue so new sessions start in insert mode.

@jeffreytse
Copy link
Owner Author

@jeffreytse jeffreytse commented on c8ca1a1 Sep 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffreytse this commit is causing new shell sessions to start in normal mode rather than insert mode. Switching $ZVM_MODE_INSERT and $ZVM_MODE_NORMAL resolves the issue so new sessions start in insert mode.

Hi @parispjones

Could you please create an issue for this problem? I will try to fix it ASAP. : )

Thanks & Regards

@VeryDampTowel
Copy link
Contributor

@VeryDampTowel VeryDampTowel commented on c8ca1a1 Sep 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jeffreytse Done. Issue: #245 and PR: #246

Please sign in to comment.