diff options
author | hoek <hoek@FreeBSD.org> | 1999-06-02 03:42:39 +0000 |
---|---|---|
committer | hoek <hoek@FreeBSD.org> | 1999-06-02 03:42:39 +0000 |
commit | 32b616a48e67944eea9704d712d8cc7adc80bfb3 (patch) | |
tree | cae4bf3b1aea4961faddad2c13a49487d92d3b2e /usr.bin/more | |
parent | 3b531265df52d6694a750e5ccc98f84ec147c98f (diff) | |
download | FreeBSD-src-32b616a48e67944eea9704d712d8cc7adc80bfb3.zip FreeBSD-src-32b616a48e67944eea9704d712d8cc7adc80bfb3.tar.gz |
Don't print backspaces in first column since they backup to the prev line.
Diffstat (limited to 'usr.bin/more')
-rw-r--r-- | usr.bin/more/output.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/usr.bin/more/output.c b/usr.bin/more/output.c index ab8367d..862dbc2 100644 --- a/usr.bin/more/output.c +++ b/usr.bin/more/output.c @@ -38,7 +38,7 @@ static char sccsid[] = "@(#)output.c 8.1 (Berkeley) 6/6/93"; #ifndef lint static const char rcsid[] = - "$Id$"; + "$Id: output.c,v 1.9 1999/05/30 18:06:56 hoek Exp $"; #endif /* not lint */ /* @@ -196,10 +196,17 @@ put_line() } while ((column % tabstop) != 0); break; case '\b': - /* markup() before putbs() ? */ - column += markup(&ent_ul, &ent_bo); - putbs(); - column--; + /* + * column must be at least one greater than + * eff_horiz_off (ie. we must be in the second or + * beyond screen column) or we'll just end-up + * backspacing up to the previous line. + */ + if (column > eff_horiz_off) { + column += markup(&ent_ul, &ent_bo); + putbs(); + column--; + } break; case '\r': /* treat \r\n sequences like \n if -u flag not set. */ |