mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
Merge 603fce64b5 into f824e5e84d
This commit is contained in:
commit
5f7e19fd32
1 changed files with 11 additions and 0 deletions
|
|
@ -203,5 +203,16 @@ _zsh_highlight_load_highlighters "${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-${0:h}/highl
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Reset scratch variables when commandline is done.
|
||||||
|
_zsh_highlight_preexec_hook()
|
||||||
|
{
|
||||||
|
_ZSH_HIGHLIGHT_PRIOR_BUFFER=
|
||||||
|
_ZSH_HIGHLIGHT_PRIOR_CURSOR=
|
||||||
|
}
|
||||||
|
autoload -U add-zsh-hook
|
||||||
|
add-zsh-hook preexec _zsh_highlight_preexec_hook 2>/dev/null || {
|
||||||
|
echo 'zsh-syntax-highlighting: failed loading add-zsh-hook.' >&2
|
||||||
|
}
|
||||||
|
|
||||||
# Initialize the array of active highlighters if needed.
|
# Initialize the array of active highlighters if needed.
|
||||||
[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main) || true
|
[[ $#ZSH_HIGHLIGHT_HIGHLIGHTERS -eq 0 ]] && ZSH_HIGHLIGHT_HIGHLIGHTERS=(main) || true
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue