浏览代码

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 年前
提交者 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]#*:}; \

正在加载...
取消
保存