diff options
-rw-r--r-- | usr.bin/sed/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/usr.bin/sed/main.c b/usr.bin/sed/main.c index 3ddc5e7a7a1..2ef2ec1013f 100644 --- a/usr.bin/sed/main.c +++ b/usr.bin/sed/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.36 2017/12/13 16:06:34 millert Exp $ */ +/* $OpenBSD: main.c,v 1.37 2018/07/11 06:57:18 martijn Exp $ */ /*- * Copyright (c) 1992 Diomidis Spinellis. @@ -160,6 +160,10 @@ main(int argc, char *argv[]) termwidth = win.ws_col; if (termwidth == 0) termwidth = 80; + if (termwidth <= 8) + termwidth = 1; + else + termwidth -= 8; if (inplace != NULL) { if (pledge("stdio rpath wpath cpath fattr chown", NULL) == -1) |