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

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15175
Author: @lhecker
Created: 4/13/2023
Status: Merged
Merged: 4/25/2023
Merged by: @microsoft-github-policy-service[bot]

Base: mainHead: dev/lhecker/14957-fix-resize-glitch


📝 Commits (2)

  • 0adf75b Fix missing call to UpdateViewport::UpdateViewport during tearout
  • daab106 Update src/cascadia/TerminalControl/ControlCore.cpp

📊 Changes

3 files changed (+4 additions, -3 deletions)

View changed files

📝 src/cascadia/TerminalControl/ControlCore.cpp (+2 -2)
📝 src/renderer/base/renderer.cpp (+1 -0)
📝 src/renderer/base/renderer.hpp (+1 -1)

📄 Description

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

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/15175 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 4/13/2023 **Status:** ✅ Merged **Merged:** 4/25/2023 **Merged by:** [@microsoft-github-policy-service[bot]](https://github.com/apps/microsoft-github-policy-service) **Base:** `main` ← **Head:** `dev/lhecker/14957-fix-resize-glitch` --- ### 📝 Commits (2) - [`0adf75b`](https://github.com/microsoft/terminal/commit/0adf75ba44ca31d45775cc2edc2d78f206a70c4c) Fix missing call to UpdateViewport::UpdateViewport during tearout - [`daab106`](https://github.com/microsoft/terminal/commit/daab1065dac5568c4d215f2aaa5ecb3683309854) Update src/cascadia/TerminalControl/ControlCore.cpp ### 📊 Changes **3 files changed** (+4 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/ControlCore.cpp` (+2 -2) 📝 `src/renderer/base/renderer.cpp` (+1 -0) 📝 `src/renderer/base/renderer.hpp` (+1 -1) </details> ### 📄 Description 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 ✅ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:41:00 +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#30472