Open dimdimbe opened 7 years ago
I'm not sure I understand the screenshot. Can you make a simpler case and see if it works?
I will try to make a simpler case.
In the mean time i made a video screenshot maybe it's clearer
I think it's because i play with "stdin" I have the same issue with the following code
const log = require('single-line-log').stdout
process.stdin.on('data',(chunk) => {
log.clear()
log('i just type: '+chunk.toString())
})
Ahh, yeah, that is probably not a good idea to mix with single-line-log
:)
i just try changing line 28 in the index.js file of the module
str += MOVE_LEFT + CLEAR_LINE + (i < prevLineCount-1 ? MOVE_UP : '');
by removing the "-1"
str += MOVE_LEFT + CLEAR_LINE + (i < prevLineCount ? MOVE_UP : '');
It fix my problem, and when i run the test.js file, everything look fine as well
Can i propose this as a PR ? or the "-1" has a purpose
I'm almost in my bed, but it'd be nice if you do a PR, then I'll take a look tomorrow
Same for me ;) I'll do a PR (at least try , i'm quite new to open source stuff)
Thank's for your time and for the module :D
Hi,
The first line stay in the console when i do
log(logStr.join('\n')) //logStr is a array of string
Am i doing something wrong? Is there someone experiencing the same "bug" ?
Thank you in advance