From 0dbbd777b11ad27c3a227f48cdaf66ea55c8de3b Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sat, 10 May 2008 12:50:25 +0000 Subject: [PATCH] Linux rxvt doesn't support parm_dch or delete_character. --- CHANGES | 4 ++-- tty.c | 11 +++++------ 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 0b4f0afc..b8e55a0a 100644 --- a/CHANGES +++ b/CHANGES @@ -23,7 +23,7 @@ * Big internal reorganisation. Rather than leaving control of the tty solely in the client and piping all data through a socket to it, change so that the server opens the tty again and reads and writes to it directly. This avoids - a lot of buffering and copying.Also reorganise the redrawing stuff so that + a lot of buffering and copying. Also reorganise the redrawing stuff so that everything goes through screen_draw_* - this makes the code simpler, but still needs broken up more, and all the ways of writing to screens should be more consistent. @@ -303,4 +303,4 @@ (including mutt, emacs). No status bar yet and no key remapping or other customisation. -$Id: CHANGES,v 1.92 2008-01-02 19:22:21 nicm Exp $ +$Id: CHANGES,v 1.93 2008-05-10 12:50:25 nicm Exp $ diff --git a/tty.c b/tty.c index 1ba489df..81717ba5 100644 --- a/tty.c +++ b/tty.c @@ -1,4 +1,4 @@ -/* $Id: tty.c,v 1.18 2008-01-02 19:22:21 nicm Exp $ */ +/* $Id: tty.c,v 1.19 2008-05-10 12:50:25 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -255,10 +255,6 @@ tty_find_term(char *name, int fd, char **cause) xasprintf(cause, "parm_ich missing"); goto error; } - if (parm_dch == NULL && delete_character == NULL) { - xasprintf(cause, "parm_dch missing"); - goto error; - } if (scroll_reverse == NULL) { xasprintf(cause, "scroll_reverse missing"); goto error; @@ -477,9 +473,12 @@ tty_vwrite(struct tty *tty, unused struct screen *s, int cmd, va_list ap) ua = va_arg(ap, u_int); if (parm_dch != NULL) tty_puts(tty, tparm(parm_dch, ua)); - else { + else if (delete_character != NULL) { while (ua-- > 0) tty_puts(tty, delete_character); + } else { + while (ua-- > 0) + tty_putc(tty, '\008'); } break; case TTY_CURSORON: