Repository navigation
Conversation
While paused, RenderService defers refreshes until the IntersectionObserver reports the terminal back on screen, a frame after it is visible. A new renderer set while paused, or a sync redraw requested after its canvas was cleared, then showed the terminal blank for that frame. Both now render synchronously while paused. Fixes xtermjs#6239 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #6239.
While a terminal is paused,
RenderServicedefers refreshes until theIntersectionObserverreports it back on screen, which happens after the first frame it is visible in is painted. That's harmless while the canvas still holds the last frame, but it leaves the terminal blank for that frame when the renderer has nothing to show:setRendererwhile paused: the new renderer starts out empty. Apps that keep the WebGL renderer only for visible terminals, to stay within the WebGL context limit, do this whenever a terminal is shown.syncredraw while paused: Force a sync render after resize occurs #5529 asks for one when the WebGL addon'sResizeObserverresizes the canvas, which clears it, butrefreshRowsdropped it while paused.Both now render synchronously while paused:
refreshRowswithsyncruns the paused resize and renders, still marking a full refresh for when rendering resumes, andsetRendererrenders right away when paused. Other refreshes still wait for the pause to end.Verification
npm run test-unit, with the newRenderService.test.ts: while paused, a new renderer and asyncredraw (after a paused resize) render right away, and other refreshes wait for the observer; while not paused, a new renderer renders on the next frame. The first two fail without the change.npm run lint-changesPage.startScreencast: in 6 switches each, master showed 6 blank frames at pixel ratios of 1 and 1.75, this branch none.🤖 Generated with Claude Code