diff options
Diffstat (limited to 'internal/wizard.zsh')
-rw-r--r-- | internal/wizard.zsh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/internal/wizard.zsh b/internal/wizard.zsh index 5d6215a7..64695f1a 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() { @@ -1444,7 +1449,7 @@ function print_instant_prompt_link() { } function ask_instant_prompt() { - if ! is-at-least 5.4; then + if [[ $ZSH_VERSION != (5.<4->*|<6->.*) ]]; then instant_prompt=off options+=instant_prompt=auto-off return 0 @@ -2003,9 +2008,8 @@ else fi zmodload zsh/terminfo || return -autoload -Uz is-at-least || return -if is-at-least 5.7.1 && [[ $COLORTERM == (24bit|truecolor) ]]; then +if [[ $ZSH_VERSION == (5.7.<1->*|5.<8->*|<6->.*) && $COLORTERM == (24bit|truecolor) ]]; then local -ir has_truecolor=1 else local -ir has_truecolor=0 |