1
0
Fork 0
mirror of synced 2024-11-16 04:55:35 -05:00

Fix #85: Prompt is blank after <Tab><Tab><Ctrl-C>

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
<Tab><Tab><Ctrl-C>. This was observed in Prezto too.
This commit is contained in:
Eric Nielsen 2016-09-28 18:03:06 -05:00
parent b1d5c00d5f
commit 33a3988774

View file

@ -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 <Tab><Tab><Ctrl-C>
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