Skip to content

Wrap user-defined widgets #203

Closed
Closed
@danielshahaf

Description

@danielshahaf

_zsh_highlight_bind_widgets uses the following code to decide which widgets to wrap:

  for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|yank-pop)}; do
    case $widgets[$cur_widget] in

      # Already rebound event: do nothing.
      user:$cur_widget|user:_zsh_highlight_widget_*);;

User-defined widgets, such as edit-command-line or even a trivial f() {}; zle -N f (which both fall into the first branch of that case pattern), should be wrapped to recompute highlighting like other widgets.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions