From 5ae542e7eed70cf37a658356f37a913a8c4aefef Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Thu, 12 Nov 2009 08:05:23 +0000 Subject: [PATCH] Emulate the ri (reverse index) capability: this allows tmux to at least start on Sun consoles (TERM=sun or sun-color), even if there appear to still be problems on some boxes (my Blade 100 is fine but edd's Blade 1000 shows odd screen corruption). --- tty-term.c | 4 ---- tty.c | 3 ++- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/tty-term.c b/tty-term.c index 22fdcb60..09ff9b1e 100644 --- a/tty-term.c +++ b/tty-term.c @@ -378,10 +378,6 @@ tty_term_find(char *name, int fd, const char *overrides, char **cause) xasprintf(cause, "terminal does not support clear"); goto error; } - if (!tty_term_has(term, TTYC_RI)) { - xasprintf(cause, "terminal does not support ri"); - goto error; - } if (!tty_term_has(term, TTYC_CUP)) { xasprintf(cause, "terminal does not support cup"); goto error; diff --git a/tty.c b/tty.c index f7b3ec03..8855a657 100644 --- a/tty.c +++ b/tty.c @@ -711,7 +711,8 @@ tty_cmd_reverseindex(struct tty *tty, const struct tty_ctx *ctx) return; if (wp->xoff != 0 || screen_size_x(s) < tty->sx || - !tty_term_has(tty->term, TTYC_CSR)) { + !tty_term_has(tty->term, TTYC_CSR) || + !tty_term_has(tty->term, TTYC_RI)) { tty_redraw_region(tty, ctx); return; }