Align browser registerMarker alt-buffer guard with headless

Block registerMarker on the alternate buffer in CoreBrowserTerminal,
matching headless addMarker behavior. Update public typings to
IMarker | undefined and add regression tests.

Fixes #5937

Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
This commit is contained in:
Cursor Agent
2026-05-27 18:22:33 +00:00
co-authored by Daniel Imms
parent 2ab0f10a26
commit e331541fd1
8 changed files with 46 additions and 15 deletions
@@ -131,6 +131,9 @@ export class DecorationManager extends Disposable {
const decorations: IDecoration[] = [];
for (const range of decorationRanges) {
const marker = this._terminal.registerMarker(range[0]);
if (!marker) {
continue;
}
const decoration = this._terminal.registerDecoration({
marker,
x: range[1],