From 0242c7eff18133558e4e1319347d8c44fb2435cc Mon Sep 17 00:00:00 2001 From: Eric Freese Date: Wed, 24 Feb 2016 13:59:49 -0700 Subject: [PATCH] Fix highlighting when sh_word_split option is enabled --- src/highlight.zsh | 2 +- zsh-autosuggestions.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/highlight.zsh b/src/highlight.zsh index 41cc0ac..97c3279 100644 --- a/src/highlight.zsh +++ b/src/highlight.zsh @@ -15,7 +15,7 @@ _zsh_autosuggest_highlight_reset() { _zsh_autosuggest_highlight_apply() { if [ $#POSTDISPLAY -gt 0 ]; then _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" - region_highlight+=($_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT) + region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT") else unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT fi diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index a2a3bd8..c466ebc 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -196,7 +196,7 @@ _zsh_autosuggest_highlight_reset() { _zsh_autosuggest_highlight_apply() { if [ $#POSTDISPLAY -gt 0 ]; then _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" - region_highlight+=($_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT) + region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT") else unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT fi