Fix highlighting when sh_word_split option is enabled

This commit is contained in:
Eric Freese 2016-02-24 13:59:49 -07:00
parent 9d100f4f32
commit 0242c7eff1
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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