From 8c3fdea75ddcb83558b2d41c39a6fbec424f7ce1 Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Tue, 23 Feb 2016 10:20:13 -0700 Subject: [PATCH] Call original accept-line widget when executing suggestion --- src/widgets.zsh | 4 +++- zsh-autosuggestions.zsh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/widgets.zsh b/src/widgets.zsh index 3c75cd3..925a5e2 100644 --- a/src/widgets.zsh +++ b/src/widgets.zsh @@ -55,7 +55,9 @@ _zsh_autosuggest_execute() { # Remove the suggestion unset POSTDISPLAY - zle .accept-line + # Call the original `accept-line` to handle syntax highlighting or + # other potential custom behavior + _zsh_autosuggest_invoke_original_widget "accept-line" } # Partially accept the suggestion diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index 6124953..cd8ad5a 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -266,7 +266,9 @@ _zsh_autosuggest_execute() { # Remove the suggestion unset POSTDISPLAY - zle .accept-line + # Call the original `accept-line` to handle syntax highlighting or + # other potential custom behavior + _zsh_autosuggest_invoke_original_widget "accept-line" } # Partially accept the suggestion