From 010ed35cde75e299ead8b4070a563d4201b84a48 Mon Sep 17 00:00:00 2001 From: Bryan Bugyi Date: Sun, 3 Apr 2022 12:53:41 -0400 Subject: [PATCH] Fix 'bad math expression' bug --- zsh-autosuggestions.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index b19cac7..3525614 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -253,7 +253,7 @@ _zsh_autosuggest_highlight_reset() { _zsh_autosuggest_highlight_apply() { typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT - if (( $#POSTDISPLAY )); then + if (( ${#POSTDISPLAY} )); then typeset -g _ZSH_AUTOSUGGEST_LAST_HIGHLIGHT="$#BUFFER $(($#BUFFER + $#POSTDISPLAY)) $ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE" region_highlight+=("$_ZSH_AUTOSUGGEST_LAST_HIGHLIGHT") else