File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -403,7 +403,17 @@ _zsh_highlight_call_widget()
403403 _zsh_highlight
404404}
405405
406- if _zsh_highlight__function_callable_p add-zle-hook-widget
406+ # Decide whether to use the zle-line-pre-redraw codepath (colloquially known as
407+ # "feature/redrawhook", after the topic branch's name) or the legacy "bind all
408+ # widgets" codepath.
409+ #
410+ # We use the new codepath under two conditions:
411+ #
412+ # 1. If it's available, which we check by testing for add-zle-hook-widget's availability.
413+ #
414+ # 2. If zsh has the memo= feature, which is required for interoperability reasons.
415+ # See issues #579 and #735, and the issues referenced from them.
416+ if (( zsh_highlight__memo_feature )) && _zsh_highlight__function_callable_p add-zle-hook-widget
407417then
408418 autoload -U add-zle-hook-widget
409419 _zsh_highlight__zle-line-finish () {
You can’t perform that action at this time.
0 commit comments