mirror of
https://github.com/sheumann/hush.git
synced 2024-12-27 01:32:08 +00:00
Fix tab-tab listing of files so it properly reflects current
terminal width. -Erik
This commit is contained in:
parent
7ce75f44ae
commit
2c24bb80f9
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user