9bd88bb9aaf12e62b100fd68b95eb530cf953614
- Author
- Robby Russell <robby@planetargon.com>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Merge pull request #4251 from mcornella/fix-completion-dots
Fix completion waiting dots function
Diff
1diff --git a/lib/completion.zsh b/lib/completion.zsh
2index 452c0dfe765539dd6cf0a83f85037c7ac5f571a9..f5b29247127543f4aec6ffec6bdb4b29bcdd9de1 100644
3--- a/lib/completion.zsh
4+++ b/lib/completion.zsh
5@@ -58,9 +58,13 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
6 # ... unless we really want to.
7 zstyle '*' single-ignored show
8
9-if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then
10+if [[ $COMPLETION_WAITING_DOTS = true ]]; then
11 expand-or-complete-with-dots() {
12- echo -n "\e[31m......\e[0m"
13+ # toggle line-wrapping off and back on again
14+ [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam
15+ print -Pn "%{%F{red}......%f%}"
16+ [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti smam
17+
18 zle expand-or-complete
19 zle redisplay
20 }