driver, main: Add -z to autoload calls
This commit is contained in:
parent
15e288a25c
commit
2c0c75a8ee
@ -1074,7 +1074,7 @@ _zsh_highlight_main__precmd_hook() {
|
|||||||
_zsh_highlight_main__command_type_cache=()
|
_zsh_highlight_main__command_type_cache=()
|
||||||
}
|
}
|
||||||
|
|
||||||
autoload -U add-zsh-hook
|
autoload -Uz add-zsh-hook
|
||||||
if add-zsh-hook precmd _zsh_highlight_main__precmd_hook 2>/dev/null; then
|
if add-zsh-hook precmd _zsh_highlight_main__precmd_hook 2>/dev/null; then
|
||||||
# Initialize command type cache
|
# Initialize command type cache
|
||||||
typeset -gA _zsh_highlight_main__command_type_cache
|
typeset -gA _zsh_highlight_main__command_type_cache
|
||||||
|
@ -55,7 +55,7 @@ fi
|
|||||||
|
|
||||||
# Use workaround for bug in ZSH?
|
# Use workaround for bug in ZSH?
|
||||||
# zsh-users/zsh@48cadf4 http://www.zsh.org/mla/workers//2017/msg00034.html
|
# zsh-users/zsh@48cadf4 http://www.zsh.org/mla/workers//2017/msg00034.html
|
||||||
autoload -U is-at-least
|
autoload -Uz is-at-least
|
||||||
if is-at-least 5.4; then
|
if is-at-least 5.4; then
|
||||||
zsh_highlight__pat_static_bug=false
|
zsh_highlight__pat_static_bug=false
|
||||||
else
|
else
|
||||||
@ -421,7 +421,7 @@ _zsh_highlight_preexec_hook()
|
|||||||
typeset -g _ZSH_HIGHLIGHT_PRIOR_BUFFER=
|
typeset -g _ZSH_HIGHLIGHT_PRIOR_BUFFER=
|
||||||
typeset -gi _ZSH_HIGHLIGHT_PRIOR_CURSOR=
|
typeset -gi _ZSH_HIGHLIGHT_PRIOR_CURSOR=
|
||||||
}
|
}
|
||||||
autoload -U add-zsh-hook
|
autoload -Uz add-zsh-hook
|
||||||
add-zsh-hook preexec _zsh_highlight_preexec_hook 2>/dev/null || {
|
add-zsh-hook preexec _zsh_highlight_preexec_hook 2>/dev/null || {
|
||||||
print -r -- >&2 'zsh-syntax-highlighting: failed loading add-zsh-hook.'
|
print -r -- >&2 'zsh-syntax-highlighting: failed loading add-zsh-hook.'
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user