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:
parent
b1d5c00d5f
commit
33a3988774
1 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue