1st try moving the cursor in accept-line with a call to a vanilla zsh widget

This commit is contained in:
Arnaud Venturi 2017-11-24 14:54:59 +01:00
parent f3bb215c76
commit d4c6aab96c
2 changed files with 4 additions and 10 deletions

View File

@ -132,14 +132,11 @@ _zsh_autosuggest_accept() {
# Move the cursor to the end of the buffer
CURSOR=${#BUFFER}
_zsh_autosuggest_invoke_original_widget end-of-line
fi
_zsh_autosuggest_invoke_original_widget $@
# If zsh-syntax-highlighting is installed, we need to refresh the highlighting here
if [ `whence _zsh_highlight` ]; then
_zsh_highlight
fi
}
# Accept the entire suggestion and execute it

View File

@ -397,14 +397,11 @@ _zsh_autosuggest_accept() {
# Move the cursor to the end of the buffer
CURSOR=${#BUFFER}
_zsh_autosuggest_invoke_original_widget end-of-line
fi
_zsh_autosuggest_invoke_original_widget $@
# If zsh-syntax-highlighting is installed, we need to refresh the highlighting here
if [ `whence _zsh_highlight` ]; then
_zsh_highlight
fi
}
# Accept the entire suggestion and execute it