Avoid processing the same buffer multiple times.
This commit is contained in:
parent
ce15291cfb
commit
a4e7eddae7
@ -137,6 +137,10 @@ _zsh_highlight-string() {
|
|||||||
|
|
||||||
# Recolorize the current ZLE buffer.
|
# Recolorize the current ZLE buffer.
|
||||||
_zsh_highlight-zle-buffer() {
|
_zsh_highlight-zle-buffer() {
|
||||||
|
# Avoid doing the same work over and over
|
||||||
|
[[ ${ZSH_PRIOR_HIGHLIGHTED_BUFFER:-} == $BUFFER ]] && return
|
||||||
|
ZSH_PRIOR_HIGHLIGHTED_BUFFER=$BUFFER
|
||||||
|
|
||||||
setopt localoptions extendedglob bareglobqual
|
setopt localoptions extendedglob bareglobqual
|
||||||
local colorize=true
|
local colorize=true
|
||||||
local start_pos=0
|
local start_pos=0
|
||||||
|
Loading…
Reference in New Issue
Block a user