projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ce75f4
)
Fix tab-tab listing of files so it properly reflects current
author
Eric Andersen
<andersen@codepoet.org>
Thu, 2 Jan 2003 07:25:47 +0000
(07:25 -0000)
committer
Eric Andersen
<andersen@codepoet.org>
Thu, 2 Jan 2003 07:25:47 +0000
(07:25 -0000)
terminal width.
-Erik
shell/cmdedit.c
patch
|
blob
|
history
diff --git
a/shell/cmdedit.c
b/shell/cmdedit.c
index 2e102e3512ee075d75f877014bea04a6db03e647..da2b017e109ddf56835ed4fc84550d36e9541876 100644
(file)
--- a/
shell/cmdedit.c
+++ b/
shell/cmdedit.c
@@
-1088,14
+1088,13
@@
static void input_tab(int *lastWasTab)
if (l < 14)
l = 14;
printf("%-14s ", matches[i]);
+ col+=l;
if ((l += 2) > 16)
while (l % 16) {
putchar(' ');
l++;
}
- col += l;
- col -= (col / cmdedit_termw) * cmdedit_termw;
- if (col > 60 && matches[i + 1] != NULL) {
+ if (col > (cmdedit_termw-l-l) && matches[i + 1] != NULL) {
putchar('\n');
col = 0;
}