From 030cabee597fd6e8d6efaac0a9eb233c0da60ccf Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Thu, 30 Dec 2010 08:50:19 -0800 Subject: [PATCH] Avoid some variables bleeding into the user's env. --- zsh-syntax-highlighting.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index b05ef49..3fb26f0 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -93,9 +93,10 @@ _zsh_highlight-string() { # Recolorize the current ZLE buffer. _zsh_highlight-zle-buffer() { setopt localoptions extendedglob bareglobqual + local colorize=true + local start_pos=0 + local end_pos arg style region_highlight=() - colorize=true - start_pos=0 for arg in ${(z)BUFFER}; do local substr_color=0 ((start_pos+=${#BUFFER[$start_pos+1,-1]}-${#${BUFFER[$start_pos+1,-1]##[[:space:]]#}}))