From bb6943ba6d2d20ea2a561d25bfef134cfe333f62 Mon Sep 17 00:00:00 2001 From: Austin Traver <25112463+austintraver@users.noreply.github.com> Date: Sun, 7 Jul 2019 07:33:49 -0700 Subject: [PATCH] Patch syntax highlighting bug I personally use ksh-style arrays, but I noticed that this plugin doesn't work when that setting is enabled. Adding this one line of code allows this plugin to work for users who include "setopt ksharrays" in their .zshrc file. --- zsh-syntax-highlighting.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index df8a1aa..cc08aec 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -85,6 +85,8 @@ _zsh_highlight() # Before we 'emulate -L', save the user's options local -A zsyh_user_options + # Retain 1-indexing of zsh arrays + setopt localoptions noksharrays if zmodload -e zsh/parameter; then zsyh_user_options=("${(@kv)options}") else