diff options
author | Sami Kerola | 2013-08-18 02:17:34 +0200 |
---|---|---|
committer | Sami Kerola | 2013-08-29 19:14:07 +0200 |
commit | 5721ea5753987a0657c47e5e7ab08c8a486c6785 (patch) | |
tree | d0bb9fa2f42ce53d7511b9087dc2a1c3e18d043c /term-utils | |
parent | mesg: sync usage() with howto-usage-function.txt (diff) | |
download | kernel-qcow2-util-linux-5721ea5753987a0657c47e5e7ab08c8a486c6785.tar.gz kernel-qcow2-util-linux-5721ea5753987a0657c47e5e7ab08c8a486c6785.tar.xz kernel-qcow2-util-linux-5721ea5753987a0657c47e5e7ab08c8a486c6785.zip |
wall: line wrap at column 79 also when line has tab chars
Earlier tabs caused random ragged right indentation, because the tab
length was assumed to be 1 char which is not the case most of the time.
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'term-utils')
-rw-r--r-- | term-utils/wall.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/term-utils/wall.c b/term-utils/wall.c index 451b5d31a..fbea7e42f 100644 --- a/term-utils/wall.c +++ b/term-utils/wall.c @@ -281,6 +281,8 @@ static char *makemsg(char *fname, char **mvec, int mvecsz, putc('\n', fp); cnt = 0; } + if (ch == '\t') + cnt += (7 - (cnt % 8)); if (ch != '\n') carefulputc(ch, fp, '^'); } |