aboutsummaryrefslogtreecommitdiff
path: root/internal/wizard.zsh
diff options
context:
space:
mode:
authorRoman Perepelitsa <roman.perepelitsa@gmail.com>2022-07-21 14:54:51 +0300
committerRoman Perepelitsa <roman.perepelitsa@gmail.com>2022-07-21 14:54:51 +0300
commite72264e01cb24431455ed6e398a769bca0da7ffe (patch)
treeabb179cb9181e67e92b4a07d2eff07d5f6c0e8e7 /internal/wizard.zsh
parentfd5fa095046233c7b4cddc3f1b7de04aae36f9fe (diff)
don't trust cnorm as it's incorrect in some combinations of terminals and terminfo (#1699)
Diffstat (limited to 'internal/wizard.zsh')
-rw-r--r--internal/wizard.zsh7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh
index 5d6215a7..2ffb606c 100644
--- a/internal/wizard.zsh
+++ b/internal/wizard.zsh
@@ -222,7 +222,12 @@ function hide_cursor() {
}
function show_cursor() {
- echoti cnorm 2>/dev/null
+ local cnorm=${terminfo[cnorm]-}
+ if [[ $cnorm == *$'\e[?25h'(|'\e'*) ]]; then
+ print -n '\e[?25h'
+ else
+ print -n $cnorm
+ fi
}
function consume_input() {