diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 7f0f3de..dec467a 100755 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -261,6 +261,7 @@ _zsh_highlight_main_highlighter_highlight_string() { setopt localoptions noksharrays local i j k style varflag + local AA # Starting quote is at 1, so start parsing at offset 2 in the string. for (( i = 2 ; i < end_pos - start_pos ; i += 1 )) ; do (( j = i + start_pos - 1 )) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index 721d257..a80512c 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -45,7 +45,7 @@ _zsh_highlight() # Store the previous command return code to restore it whatever happens. local ret=$? - setopt localoptions nowarncreateglobal + setopt localoptions warncreateglobal # Do not highlight if there are more than 300 chars in the buffer. It's most # likely a pasted command or a huge list of files in that case.. @@ -125,8 +125,8 @@ _zsh_highlight() } always { - _ZSH_HIGHLIGHT_PRIOR_BUFFER=$BUFFER - _ZSH_HIGHLIGHT_PRIOR_CURSOR=$CURSOR + typeset -g _ZSH_HIGHLIGHT_PRIOR_BUFFER=$BUFFER + typeset -gi _ZSH_HIGHLIGHT_PRIOR_CURSOR=$CURSOR } }