diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-06 10:33:13 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-10-06 10:33:13 +0000 |
commit | 817d2ef15a8c0e11944437b754913c6c24975dd7 (patch) | |
tree | 1b3fb5b457d8e7fa361a627d93325997988110d3 /usr.bin/tmux | |
parent | 9901c7b230b0cce75f9c85e0428da8cdceaf730c (diff) |
Do not reset cursor to default if it has never been changed, fixes
problem reported by naddy.
Diffstat (limited to 'usr.bin/tmux')
-rw-r--r-- | usr.bin/tmux/tty.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.bin/tmux/tty.c b/usr.bin/tmux/tty.c index 25eabdb45c4..9426448acda 100644 --- a/usr.bin/tmux/tty.c +++ b/usr.bin/tmux/tty.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tty.c,v 1.404 2021/10/05 12:46:02 nicm Exp $ */ +/* $OpenBSD: tty.c,v 1.405 2021/10/06 10:33:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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; |