From fc5d71d822ac93dd1052a8f796bb03fd3e88ce3f Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 11 Jun 2010 07:23:04 +0000 Subject: Teach -Tps to ignore backspace-encoding by using a one-char buffer and a simple state machine. This paves the way for decorated text. --- term.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index bdcd2879..dbdc2441 100644 --- a/term.c +++ b/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.146 2010/06/08 15:00:17 kristaps Exp $ */ +/* $Id: term.c,v 1.147 2010/06/11 07:23:04 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -603,10 +603,7 @@ encode(struct termp *p, const char *word, size_t sz) * character by character. */ - if (TERMTYPE_PS == p->type) { - buffera(p, word, sz); - return; - } else if (TERMFONT_NONE == (f = term_fonttop(p))) { + if (TERMFONT_NONE == (f = term_fonttop(p))) { buffera(p, word, sz); return; } -- cgit v1.2.3