You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you have a search and your buffer is already at the scrollback limit (so that older lines are dropped), any multi-line term.write() and any term.writeln() ending in \n causes the march decorations to fall out of sync with the buffer and mark the wrong lines.
Video:
Repro sandbox: https://codesandbox.io/p/sandbox/xtermjs-demo-forked-2jpjsz
It looks like every multi-line .write() will cause this bug, and only the .writeln() that ends with new lines.
In the sandbox I provided a bunch of example combinations where it breaks or doesn't.
This only works when the buffer is already at the scrollback limit, so I changed the options to have 0 scrollback to facilitate testing.
If you have a search and your buffer is already at the scrollback limit (so that older lines are dropped), any multi-line
term.write()and anyterm.writeln()ending in\ncauses the march decorations to fall out of sync with the buffer and mark the wrong lines.Video:
xtermjs_search_bug.mp4
Details
Versions:
Repro sandbox: https://codesandbox.io/p/sandbox/xtermjs-demo-forked-2jpjsz
It looks like every multi-line
.write()will cause this bug, and only the.writeln()that ends with new lines.In the sandbox I provided a bunch of example combinations where it breaks or doesn't.
This only works when the buffer is already at the scrollback limit, so I changed the options to have 0 scrollback to facilitate testing.