fix for AUTOSUGGESTION_ACCEPT_RIGHT_ARROW in vi-mode

This commit is contained in:
Claude 2015-09-18 13:13:09 +02:00
parent cbaf7ced6e
commit fc4576758c

View file

@ -239,7 +239,7 @@ autosuggest-tab() {
} }
autosuggest-accept-suggestion() { autosuggest-accept-suggestion() {
if [[ AUTOSUGGESTION_ACCEPT_RIGHT_ARROW -eq 1 && "$WIDGET" == 'forward-char' ]]; then if [[ AUTOSUGGESTION_ACCEPT_RIGHT_ARROW -eq 1 && ("$WIDGET" == 'forward-char' || "$WIDGET" == 'vi-forward-char') ]]; then
zle autosuggest-end-of-line-orig "$@" zle autosuggest-end-of-line-orig "$@"
else else
zle autosuggest-${WIDGET}-orig "$@" zle autosuggest-${WIDGET}-orig "$@"