There are two issues with the scrollback limit of the Log component.
shiftLine is used incorrectly (two arguments instead of one), so only a single line is removed from the scrollback on each call.
If the caller pushes a huge number of lines on each call, the log can still exceed the scrollback limit.
Issue 1 can be reproduced by any code that repeatedly calls log with a string containing a newline, issue 2 is more theoretical, but this commit fixes both at the same time.
There are two issues with the scrollback limit of the Log component.
Issue 1 can be reproduced by any code that repeatedly calls log with a string containing a newline, issue 2 is more theoretical, but this commit fixes both at the same time.