From b1476ce53460e87dc068a01011d3b1cf30540bb4 Mon Sep 17 00:00:00 2001 From: vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> Date: Sun, 31 Dec 2006 19:36:01 +0000 Subject: less: fix <tab><backspace> buglet git-svn-id: svn://busybox.net/trunk/busybox@17121 69ca8d6d-28ef-0310-b511-8ec308f3f277 --- miscutils/less.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/miscutils/less.c b/miscutils/less.c index ae936c2fb..20da02208 100644 --- a/miscutils/less.c +++ b/miscutils/less.c @@ -212,13 +212,13 @@ static void read_lines(void) } } c = readbuf[readpos]; - /* backspace? [need this for manpage display] */ - if (c == '\x8' && linepos) { + /* backspace? [needed for manpages] */ + /* <tab><bs> is (a) insane and */ + /* (b) harder to do correctly, so we refuse to do it */ + if (c == '\x8' && linepos && p[-1] != '\t') { readpos++; /* eat it */ - /* We do not consider the case of <tab><bs> */ - /* Anyone who has that is pure evil :) */ linepos--; - *p-- = '\0'; + *--p = '\0'; continue; } if (c == '\t') -- cgit v1.2.3-55-g6feb