don't trust cnorm as it's incorrect in some combinations of terminals and terminfo (#1699)
This commit is contained in:
parent
fd5fa09504
commit
e72264e01c
2 changed files with 16 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue