Переглянути джерело

widget binding: don't exclude widgets with identical function name

Skipping when $cur_widgets == user:$cur_widget was introduced
with 776453cb5b. However there
are cases where this is not just an 'already rebound' event, but
simply a normal widget whose function name happens to be identical
to its widget name.

Example:
expand-absolute-path is a widget whose function name is also
expand-absolute-path. No reason why this should be ignored.

Another example:
edit-command-line
pull/255/merge
m0viefreak 8 роки тому
committed by Daniel Shahaf
джерело
коміт
487b122c48
1 змінених файлів з 1 додано та 1 видалено
  1. +1
    -1
      zsh-syntax-highlighting.zsh

+ 1
- 1
zsh-syntax-highlighting.zsh Переглянути файл

@ -204,7 +204,7 @@ _zsh_highlight_bind_widgets()
case $widgets[$cur_widget] in
# Already rebound event: do nothing.
user:$cur_widget|user:_zsh_highlight_widget_*);;
user:_zsh_highlight_widget_*);;
# User defined widget: override and rebind old one with prefix "orig-".
user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \

Завантаження…
Відмінити
Зберегти