add range to IHTMLSerializeOptions

This commit is contained in:
meganrogge
2025-10-28 10:27:00 -04:00
parent 9fce067266
commit 5141a91bba
3 changed files with 27 additions and 0 deletions
@@ -450,6 +450,13 @@ export class SerializeAddon implements ITerminalAddon , ISerializeApi {
const buffer = terminal.buffer.active;
const handler = new HTMLSerializeHandler(buffer, terminal, options);
const onlySelection = options.onlySelection ?? false;
const range = options.range;
if (range) {
return handler.serialize({
start: { x: 0, y: typeof range.start === 'number' ? range.start : range.start.line },
end: { x: terminal.cols, y: typeof range.end === 'number' ? range.end : range.end.line }
});
}
if (!onlySelection) {
const maxRows = buffer.length;
const scrollback = options.scrollback;