diff --git a/src/widgets.zsh b/src/widgets.zsh index ccd0b6d..9d23248 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -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 diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 0f6bb1a..37870bd 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -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