Quellcode durchsuchen

driver: _zsh_highlight_bind_widgets: Be resilient to NO_UNSET being set in the calling scope.

Fixes #449.
pull/451/head
Daniel Shahaf vor 6 Jahren
Ursprung
Commit
a2a899b41b
1 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen
  1. +2
    -2
      zsh-syntax-highlighting.zsh

+ 2
- 2
zsh-syntax-highlighting.zsh Datei anzeigen

@ -295,7 +295,7 @@ _zsh_highlight_bind_widgets()
local cur_widget
for cur_widget in $widgets_to_bind; do
case $widgets[$cur_widget] in
case ${widgets[$cur_widget]:-""} in
# Already rebound event: do nothing.
user:_zsh_highlight_widget_*);;
@ -322,7 +322,7 @@ _zsh_highlight_bind_widgets()
# Incomplete or nonexistent widget: Bind to z-sy-h directly.
*)
if [[ $cur_widget == zle-* ]] && [[ -z $widgets[$cur_widget] ]]; then
if [[ $cur_widget == zle-* ]] && (( ! ${+widgets[$cur_widget]} )); then
_zsh_highlight_widget_${cur_widget}() { :; _zsh_highlight }
zle -N $cur_widget _zsh_highlight_widget_$cur_widget
else

Laden…
Abbrechen
Speichern