Do not reset cursor to default if it has never been changed, fixes

problem reported by naddy.
pull/2918/head
nicm 2021-10-06 10:33:12 +00:00
parent da05d05824
commit 5359b76619
1 changed files with 6 additions and 4 deletions

10
tty.c
View File

@ -692,10 +692,12 @@ tty_update_cursor(struct tty *tty, int mode, int changed, struct screen *s)
tty_putcode(tty, TTYC_CNORM);
switch (cstyle) {
case SCREEN_CURSOR_DEFAULT:
if (tty_term_has(tty->term, TTYC_SE))
tty_putcode(tty, TTYC_SE);
else
tty_putcode1(tty, TTYC_SS, 0);
if (tty->cstyle != SCREEN_CURSOR_DEFAULT) {
if (tty_term_has(tty->term, TTYC_SE))
tty_putcode(tty, TTYC_SE);
else
tty_putcode1(tty, TTYC_SS, 0);
}
if (mode & (MODE_CURSOR_BLINKING|MODE_CURSOR_VERY_VISIBLE))
tty_putcode(tty, TTYC_CVVIS);
break;