[PR #15175] Fix missing call to UpdateViewport::UpdateViewport during tearout #30477

Open
opened 2026-01-31 09:41:02 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/15175

State: closed
Merged: Yes


This bug causes AtlasEngine to render buffer contents with an incorrect
cellCount, which may either cause it to draw the contents only
partially, or potentially access the TextBuffer contents out of bounds.

EnablePainting sets the _viewport to the current viewport for some
unfortunate (and quite buggy/incorrect) caching purposes, which causes
_CheckViewportAndScroll() to think that the viewport hasn't changed
in the new window. We can ensure _CheckViewportAndScroll() works
by also setting _forceUpdateViewport to true.

Part of #14957

PR Checklist

  • Tear out a tab from a smaller window to a larger window
  • Renderer contents adept to the larger window size ✅
**Original Pull Request:** https://github.com/microsoft/terminal/pull/15175 **State:** closed **Merged:** Yes --- This bug causes AtlasEngine to render buffer contents with an incorrect `cellCount`, which may either cause it to draw the contents only partially, or potentially access the TextBuffer contents out of bounds. `EnablePainting` sets the `_viewport` to the current viewport for some unfortunate (and quite buggy/incorrect) caching purposes, which causes `_CheckViewportAndScroll()` to think that the viewport hasn't changed in the new window. We can ensure `_CheckViewportAndScroll()` works by also setting `_forceUpdateViewport` to `true`. Part of #14957 ## PR Checklist * Tear out a tab from a smaller window to a larger window * Renderer contents adept to the larger window size ✅
claunia added the pull-request label 2026-01-31 09:41:02 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30477