Skip to content

Commit db1ad68

Browse files
raffisgajus
authored andcommitted
fix: stream borderless fix (#101)
1 parent 117f902 commit db1ad68

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/createStream.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,16 @@ const append = (row, columnWidthIndex, config) => {
7373
return drawRow(literalRow, config.border);
7474
}).join('');
7575

76-
let output;
76+
let output = '';
77+
const bottom = drawBorderBottom(columnWidthIndex, config.border);
7778

78-
output = '\r\u001B[K';
79+
if (bottom !== '\n') {
80+
output = '\r\u001B[K';
81+
}
7982

8083
output += drawBorderJoin(columnWidthIndex, config.border);
8184
output += body;
82-
output += drawBorderBottom(columnWidthIndex, config.border);
85+
output += bottom;
8386

8487
output = _.trimEnd(output);
8588

0 commit comments

Comments
 (0)