mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-11 22:02:31 +01:00
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:
parent
38c3ac8831
commit
fb418b90d3
3 changed files with 15 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue