From c978004c0ec926e94f8094523723e109a61f9bde Mon Sep 17 00:00:00 2001 From: dana Date: Tue, 16 Jan 2018 14:08:38 -0600 Subject: [PATCH] ..._invoke_original_widget: Return 0 when given no arguments `_zsh_autosuggest_widget_accept()` (&al.) passes this function's return status on, and ZLE rings the bell if it's >0. Not having an original widget isn't an error condition, so always returning 0 here should be OK to avoid the bell Fixes #228 --- src/bind.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bind.zsh b/src/bind.zsh index ed9a977..42a0dd0 100644 --- a/src/bind.zsh +++ b/src/bind.zsh @@ -106,7 +106,7 @@ _zsh_autosuggest_bind_widgets() { # Given the name of an original widget and args, invoke it, if it exists _zsh_autosuggest_invoke_original_widget() { # Do nothing unless called with at least one arg - (( $# )) || return + (( $# )) || return 0 local original_widget_name="$1" diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index ccfe07e..a9330ea 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -238,7 +238,7 @@ _zsh_autosuggest_bind_widgets() { # Given the name of an original widget and args, invoke it, if it exists _zsh_autosuggest_invoke_original_widget() { # Do nothing unless called with at least one arg - (( $# )) || return + (( $# )) || return 0 local original_widget_name="$1"