From e4352f98bb41c80b5a5c9892faf3998f53863868 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sun, 5 Nov 2017 15:58:58 +0000 Subject: [PATCH] driver: Revert previous commit, unbreaking the build on zsh<5.0.8. --- zsh-syntax-highlighting.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index d1470b8..e4e44fa 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -188,7 +188,11 @@ _zsh_highlight_apply_zle_highlight() { integer first="$3" second="$4" # read the relevant entry from zle_highlight - local region="${zle_highlight[(r)${(b)entry}:*]-}" + # + # ### In zsh≥5.0.8 we'd use ${(b)entry}, but we support older zsh's, so we don't + # ### add (b). The only effect is on the failure mode for callers that violate + # ### the precondition. + local region="${zle_highlight[(r)${entry}:*]-}" if [[ -z "$region" ]]; then # entry not specified at all, use default value