mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2026-10-02 16:03:50 +02:00
..._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
This commit is contained in:
1 parent
15931f04ff
commit
c978004c0e
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -106,7 +106,7 @@ _zsh_autosuggest_bind_widgets() {
|
|||||||
# Given the name of an original widget and args, invoke it, if it exists
|
# Given the name of an original widget and args, invoke it, if it exists
|
||||||
_zsh_autosuggest_invoke_original_widget() {
|
_zsh_autosuggest_invoke_original_widget() {
|
||||||
# Do nothing unless called with at least one arg
|
# Do nothing unless called with at least one arg
|
||||||
(( $# )) || return
|
(( $# )) || return 0
|
||||||
|
|
||||||
local original_widget_name="$1"
|
local original_widget_name="$1"
|
||||||
|
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ _zsh_autosuggest_bind_widgets() {
|
|||||||
# Given the name of an original widget and args, invoke it, if it exists
|
# Given the name of an original widget and args, invoke it, if it exists
|
||||||
_zsh_autosuggest_invoke_original_widget() {
|
_zsh_autosuggest_invoke_original_widget() {
|
||||||
# Do nothing unless called with at least one arg
|
# Do nothing unless called with at least one arg
|
||||||
(( $# )) || return
|
(( $# )) || return 0
|
||||||
|
|
||||||
local original_widget_name="$1"
|
local original_widget_name="$1"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user