Closed ordo-n closed 1 week ago
Thanks for the report, here is repro https://codepen.io/jcubic/pen/wvbmpgX
This is another problem with newline: false
that was integrated with the library by a contributor. Since it was added, there were a lot of bugs that we didn't think about when merging the PR.
You can fix this with a hack:
for(let i = 0; i < 100; i+=1) {
term.echo('qwerty', { newline: false });
term.update(-1, ...term.get_output(true).pop());
}
This will force having a clean partial render (partial is the output without newline), by refreshing the last line after each echo.
I will probably do something similar inside the library, but without creating garbage from Terminal::get_output()
. If there are two partials in a row, they need to be processed as one.
It seems this don't solve the problem.
It's a challenging bug, it may take a while to fix. I'm not sure how to handle one edge case.
The bug was fixed and released with version 2.42.1.
Issue summary
When I use multiple term.echo('qwerty', {newline:false}'); it correctly doesnt add a newline, but it incorrectly doesnt process newlines until I resize the window
Expected behavior
Should not have to resize window for newline to appear
Actual behavior
Trails off to the right
Steps to reproduce
for(let i = 0; i < 100; i+=1) term.echo('qwerty', {newline:false}');
Browser and OS
All browsers
Additional notes
before resize
after resize
![image](https://github.com/jcubic/jquery.terminal/assets/166300150/0c08bbee-2be0-4685-bfdc-d1607d46e3ac)