treat zle-isearch-exit like an accept-* widget

Accepting a line in an iserch does not call through any of the
accept-widgets. To be able to still do some cleanup (remove
cursor imprint, remove partial path highlinting) use
zle-isearch-exit instead.
This commit is contained in:
m0viefreak 2015-12-29 20:04:52 +01:00
commit fb418b90d3
3 changed files with 15 additions and 8 deletions

View file

@ -174,6 +174,14 @@ _zsh_highlight_cursor_moved()
[[ -n $CURSOR ]] && [[ -n ${_ZSH_HIGHLIGHT_PRIOR_CURSOR-} ]] && (($_ZSH_HIGHLIGHT_PRIOR_CURSOR != $CURSOR))
}
# Whether the current widget is an accept-line type widget.
#
# Returns 0 if the the current widget is an accept-line type widget.
_zsh_highlight_is_accept_line_type_widget()
{
[[ $WIDGET == accept-* ]] || [[ $WIDGET == zsh-isearch-exit ]]
}
# -------------------------------------------------------------------------------------------------
# Setup functions