projects
/
platform
/
upstream
/
toybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27cec9a
)
A screen width of 1 is possible (in some weird setups), and gives ls -C a division...
author
Rob Landley
<rob@landley.net>
Thu, 27 Dec 2012 01:39:51 +0000
(19:39 -0600)
committer
Rob Landley
<rob@landley.net>
Thu, 27 Dec 2012 01:39:51 +0000
(19:39 -0600)
toys/posix/ls.c
patch
|
blob
|
history
diff --git
a/toys/posix/ls.c
b/toys/posix/ls.c
index
cd881b0
..
5982adf
100644
(file)
--- a/
toys/posix/ls.c
+++ b/
toys/posix/ls.c
@@
-425,6
+425,7
@@
void ls_main(void)
else {
TT.screen_width = 80;
terminal_size(&TT.screen_width, NULL);
+ if (TT.screen_width<2) TT.screen_width = 2;
if (!(toys.optflags&(FLAG_1|FLAG_x|FLAG_m))) toys.optflags |= FLAG_C;
}
// The optflags parsing infrastructure should really do this for us,