Open
Description
problem description
- when the process.stderr.columns less than console.log('xxxxxx') string width, extra lines log, wrap line normal;
- the prevLineCount variable length calculate error;
- cause the terminal stdout occurs many whitespace lines;
source code
// LogUpdate -> render
const data = ansiEscapes.eraseLines(this.prevLineCount) + wrappedLines + '\n' + this.extraLines;
this.write(data);
// it's my problem === length is not true
this.prevLineCount = data.split('\n').length;
could you calculate length below?
this.prevLineCount = data.split('\n').length;
this.extraLines.split('\n').forEach(str => {
if (str.length > this.columns) {
this.prevLineCount += 1
}
});
That's all, thank you!
Metadata
Metadata
Assignees
Labels
No labels