diff options
author | rsc <devnull@localhost> | 2004-04-25 21:23:27 +0000 |
---|---|---|
committer | rsc <devnull@localhost> | 2004-04-25 21:23:27 +0000 |
commit | 304b47c101cd50d019b6021352723ad26e411204 (patch) | |
tree | c5df25df6b150c3ed4f416028a73efc27a1c4b46 /src | |
parent | 62780722f528fdbc19afb48128f1638e55d1568b (diff) | |
download | plan9port-304b47c101cd50d019b6021352723ad26e411204.tar.gz plan9port-304b47c101cd50d019b6021352723ad26e411204.tar.bz2 plan9port-304b47c101cd50d019b6021352723ad26e411204.zip |
collapse \r\r\r\r => \r.
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd/9term/9term.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cmd/9term/9term.c b/src/cmd/9term/9term.c index 5fab0401..feef6b68 100644 --- a/src/cmd/9term/9term.c +++ b/src/cmd/9term/9term.c @@ -229,7 +229,7 @@ threadmain(int argc, char *argv[]) maxtab = 4; /* be like rio */ snprint(buf, sizeof buf, "%d", maxtab); - putenv("tabstop", maxtab); + putenv("tabstop", buf); initdraw(0, nil, "9term"); notify(hangupnote); @@ -1080,6 +1080,10 @@ runewrite(Rune *r, int n) } else if(*p == '\r') { /* treat like ^U */ /* convert CR without NL into erased line */ /* i feel really sleazy about this but it helps */ + while(i<n-1 && *(p+1) == '\r'){ + i++; + p++; + } if(i<n-1 && *(p+1) != '\n'){ while(q > r && *(q-1) != '\n') q--; |