mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
Perf: add a comment on cache invalidation
This commit is contained in:
parent
4300652404
commit
8a17a5d1c0
1 changed files with 4 additions and 0 deletions
|
|
@ -1767,6 +1767,10 @@ _zsh_highlight_main__precmd_hook() {
|
|||
unsetopt warnnestedvar
|
||||
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__path_cache=()
|
||||
_zsh_highlight_main__arg_cache=()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue