diff --git a/src/widgets.zsh b/src/widgets.zsh index 190ddce..dfbf214 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -167,7 +167,7 @@ _zsh_autosuggest_partial_accept() { # In vicmd keymap, the cursor is placed on the current character # instead of after it. We increment it by 1 to keep the following logic # working even in thi case. - if [ $KEYMAP = 'vicmd' ]; then + if [[ "$KEYMAP" = "vicmd" ]]; then (( CURSOR++ )) fi @@ -184,7 +184,7 @@ _zsh_autosuggest_partial_accept() { fi # Restore CURSOR - if [ $KEYMAP = 'vicmd' ]; then + if [[ "$KEYMAP" = "vicmd" ]]; then (( CURSOR-- )) fi diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 931598f..f21f897 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -445,7 +445,7 @@ _zsh_autosuggest_partial_accept() { # In vicmd keymap, the cursor is placed on the current character # instead of after it. We increment it by 1 to keep the following logic # working even in thi case. - if [ $KEYMAP = 'vicmd' ]; then + if [[ "$KEYMAP" = "vicmd" ]]; then (( CURSOR++ )) fi @@ -462,7 +462,7 @@ _zsh_autosuggest_partial_accept() { fi # Restore CURSOR - if [ $KEYMAP = 'vicmd' ]; then + if [[ "$KEYMAP" = "vicmd" ]]; then (( CURSOR-- )) fi