mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2024-11-18 09:51:06 +01:00
Fix highlighting when sh_word_split option is enabled
This commit is contained in:
parent
9d100f4f32
commit
0242c7eff1
2 changed files with 2 additions and 2 deletions
|
@ -15,7 +15,7 @@ _zsh_autosuggest_highlight_reset() {
|
||||||
_zsh_autosuggest_highlight_apply() {
|
_zsh_autosuggest_highlight_apply() {
|
||||||
if [ $#POSTDISPLAY -gt 0 ]; then
|
if [ $#POSTDISPLAY -gt 0 ]; then
|
||||||
_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
|
_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
|
||||||
region_highlight+=($_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT)
|
region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT")
|
||||||
else
|
else
|
||||||
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -196,7 +196,7 @@ _zsh_autosuggest_highlight_reset() {
|
||||||
_zsh_autosuggest_highlight_apply() {
|
_zsh_autosuggest_highlight_apply() {
|
||||||
if [ $#POSTDISPLAY -gt 0 ]; then
|
if [ $#POSTDISPLAY -gt 0 ]; then
|
||||||
_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
|
_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE"
|
||||||
region_highlight+=($_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT)
|
region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT")
|
||||||
else
|
else
|
||||||
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
unset _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue