mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-04-17 11:35:32 +08:00
Perf: add a comment on cache invalidation
This commit is contained in:
parent
4300652404
commit
8a17a5d1c0
@ -1767,6 +1767,10 @@ _zsh_highlight_main__precmd_hook() {
|
|||||||
unsetopt warnnestedvar
|
unsetopt warnnestedvar
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# NOTE: Caches are invalidated (cleared) only in the precmd hook. This means that
|
||||||
|
# highlighting may not reflect state changes after the last precmd hook. For example,
|
||||||
|
# if a zle widget or another process deletes /bin/ls while ls is highlighted as a
|
||||||
|
# command, it'll keep being highlighted that way until the precmd hook is executed.
|
||||||
_zsh_highlight_main__command_type_cache=()
|
_zsh_highlight_main__command_type_cache=()
|
||||||
_zsh_highlight_main__path_cache=()
|
_zsh_highlight_main__path_cache=()
|
||||||
_zsh_highlight_main__arg_cache=()
|
_zsh_highlight_main__arg_cache=()
|
||||||
|
Loading…
Reference in New Issue
Block a user