Просмотр исходного кода

..._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
pull/304/head
dana 6 лет назад
Родитель
Сommit
c978004c0e
2 измененных файлов: 2 добавлений и 2 удалений
  1. +1
    -1
      src/bind.zsh
  2. +1
    -1
      zsh-autosuggestions.zsh

+ 1
- 1
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"

+ 1
- 1
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"

Загрузка…
Отмена
Сохранить