From 33a3988774120982a21e28bb7c8234da300840b1 Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Wed, 28 Sep 2016 18:03:06 -0500 Subject: [PATCH] Fix #85: Prompt is blank after The issue is fixed by adding `zle redisplay` after `zle expand-and-complete` for the expand-and-complete key binding. An additional `print -n '...'` is also included to show an indicator while the menu is loading, and that is purely cosmetic. There's still one glitch: the prompt jumps one line up after . This was observed in Prezto too. --- modules/input/init.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/modules/input/init.zsh b/modules/input/init.zsh index be9de1d..6fb2bde 100644 --- a/modules/input/init.zsh +++ b/modules/input/init.zsh @@ -102,6 +102,15 @@ 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 + # Put into application mode and validate ${terminfo} zle-line-init() { if (( ${+terminfo[smkx]} )); then