diff --git a/src/strategies/completion.zsh b/src/strategies/completion.zsh index 8dc1f9d..06edc20 100644 --- a/src/strategies/completion.zsh +++ b/src/strategies/completion.zsh @@ -112,7 +112,7 @@ _zsh_autosuggest_strategy_completion() { # versions of zsh (older than 5.3), we sometimes get extra bytes after # the second null byte, so trim those off the end. # See http://www.zsh.org/mla/workers/2015/msg03290.html - suggestion="${${${(M)line:#*$'\0'*$'\0'*}#*$'\0'}%%$'\0'*}" + suggestion="${${line#*$'\0'}%$'\0'*}" } always { # Destroy the pty zpty -d $ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME diff --git a/zsh-autosuggestions.zsh b/zsh-autosuggestions.zsh index cef55f8..e7d9861 100644 --- a/zsh-autosuggestions.zsh +++ b/zsh-autosuggestions.zsh @@ -594,7 +594,7 @@ _zsh_autosuggest_strategy_completion() { # versions of zsh (older than 5.3), we sometimes get extra bytes after # the second null byte, so trim those off the end. # See http://www.zsh.org/mla/workers/2015/msg03290.html - suggestion="${${${(M)line:#*$'\0'*$'\0'*}#*$'\0'}%%$'\0'*}" + suggestion="${${line#*$'\0'}%$'\0'*}" } always { # Destroy the pty zpty -d $ZSH_AUTOSUGGEST_COMPLETIONS_PTY_NAME