fix: defer viewport DOM sync during synchronized output
Defer Viewport DOM scroll updates while DEC 2026 synchronized output is active, then flush once rendering resumes so DOM and canvas update atomically. Also update demo sizing to avoid relying on removed internal viewport scrollBarWidth.
This commit is contained in:
@@ -617,8 +617,12 @@ function addDomListener(element: HTMLElement, type: string, handler: (...args: a
|
||||
}
|
||||
|
||||
function updateTerminalSize(): void {
|
||||
const showScrollbar = term!.options.scrollbar?.showScrollbar ?? true;
|
||||
const scrollBarWidth = (term!.options.scrollback === 0 || !showScrollbar)
|
||||
? 0
|
||||
: (term!.options.scrollbar?.width ?? 14);
|
||||
const width = optionsWindow.autoResize ? '100%'
|
||||
: ((term as any).dimensions.css.canvas.width + (term as any)._core.viewport.scrollBarWidth).toString() + 'px';
|
||||
: ((term as any).dimensions.css.canvas.width + scrollBarWidth).toString() + 'px';
|
||||
const height = optionsWindow.autoResize ? '100%'
|
||||
: ((term as any).dimensions.css.canvas.height).toString() + 'px';
|
||||
terminalContainer!.style.width = width;
|
||||
|
||||
Reference in New Issue
Block a user