This commit is contained in:
Your Name 2023-11-22 01:34:37 +03:00
parent 0a259a4dce
commit 751421d2e2
1 changed files with 9 additions and 10 deletions

View File

@ -182,19 +182,18 @@ void col_print(struct d_node **node, size_t files, struct winsize w) {
/* Mc print */
for (size_t i = 0; i < nrows; i++) {
for (size_t j = 0; j < ncols; j++) {
if (node[i * ncols + j] == NULL)
break;
if (i * ncols + j < files) {
if (col > 0) {
nexttab -= col;
for (int k = 0; k < nexttab; k++)
putchar(' ');
if (col > 0) {
nexttab -= col;
for (int k = 0; k < nexttab; k++)
putchar(' ');
col += nexttab;
}
col += nexttab;
nexttab = col + (int)maxlen;
col += print(node[i * ncols + j]);
}
nexttab = col + (int)maxlen;
col += print(node[i * ncols + j]);
}
putchar('\n');