diff --git a/modules/input/init.zsh b/modules/input/init.zsh index 6fb2bde..17d5b32 100644 --- a/modules/input/init.zsh +++ b/modules/input/init.zsh @@ -102,14 +102,16 @@ if [[ -n "${key_info[BackTab]}" ]]; then bindkey "${key_info[BackTab]}" reverse-menu-complete fi -# Redisplay after completing, and avoid blank prompt after -expand-or-complete-with-redisplay() { - print -n '...' - zle expand-or-complete - zle redisplay -} -zle -N expand-or-complete-with-redisplay -bindkey "${key_info[Control]}I" expand-or-complete-with-redisplay +autoload -Uz is-at-least && if ! is-at-least 5.3; then + # Redisplay after completing, and avoid blank prompt after + expand-or-complete-with-redisplay() { + print -Pn '...' + zle expand-or-complete + zle redisplay + } + zle -N expand-or-complete-with-redisplay + bindkey "${key_info[Control]}I" expand-or-complete-with-redisplay +fi # Put into application mode and validate ${terminfo} zle-line-init() {