[PR #15262] [MERGED] Fix Present1 params when scrolling the entire viewport #30549

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15262
Author: @lhecker
Created: 4/28/2023
Status: Merged
Merged: 5/8/2023
Merged by: @lhecker

Base: mainHead: dev/lhecker/atlas-engine-fixup


📝 Commits (4)

  • abe47eb Fix Present1 params when scrolling the entire viewport
  • 07915b5 Use feature flagging
  • fb4c66a Merge remote-tracking branch 'origin/main' into dev/lhecker/atlas-engine-fixup
  • 52d6966 Forgot to write back to _api.scrollOffset

📊 Changes

4 files changed (+131 additions, -115 deletions)

View changed files

📝 src/features.xml (+10 -0)
📝 src/renderer/atlas/AtlasEngine.cpp (+108 -113)
📝 src/renderer/atlas/AtlasEngine.r.cpp (+12 -1)
📝 src/renderer/atlas/common.h (+1 -1)

📄 Description

This commit makes a few changes to avoid bugs, but they basically boil
down to: When we scroll by an entire viewport worth of content, we must
ensure that the scroll offset is 0, because otherwise the scroll rect
(that's basically the viewport, but excluding the scroll offset) will
end up being empty, which the Present1 API chokes on. This commit
avoids this situation by shuffling around some code to first calculate
the dirty rows, then check if it affects all of them and in that case
sets the scroll offset to 0, and only then finally actually does any
scrolling if there's still something to scroll.

Validation Steps Performed

  • Start pwsh
  • Zoom in twice with Ctrl+Scrollwheel
  • Print a few viewports worth of text
  • Press Ctrl+L
  • No errors

🔄 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/15262 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 4/28/2023 **Status:** ✅ Merged **Merged:** 5/8/2023 **Merged by:** [@lhecker](https://github.com/lhecker) **Base:** `main` ← **Head:** `dev/lhecker/atlas-engine-fixup` --- ### 📝 Commits (4) - [`abe47eb`](https://github.com/microsoft/terminal/commit/abe47eb7ed892776b2760eb0c45d7294674a580d) Fix Present1 params when scrolling the entire viewport - [`07915b5`](https://github.com/microsoft/terminal/commit/07915b5184935861d83ae3eefbca34994390c3ae) Use feature flagging - [`fb4c66a`](https://github.com/microsoft/terminal/commit/fb4c66ab01ecb333e67bde70ef748e3e6303d26f) Merge remote-tracking branch 'origin/main' into dev/lhecker/atlas-engine-fixup - [`52d6966`](https://github.com/microsoft/terminal/commit/52d6966b482549e5af78380bf89ca7d093a8c5ec) Forgot to write back to _api.scrollOffset ### 📊 Changes **4 files changed** (+131 additions, -115 deletions) <details> <summary>View changed files</summary> 📝 `src/features.xml` (+10 -0) 📝 `src/renderer/atlas/AtlasEngine.cpp` (+108 -113) 📝 `src/renderer/atlas/AtlasEngine.r.cpp` (+12 -1) 📝 `src/renderer/atlas/common.h` (+1 -1) </details> ### 📄 Description This commit makes a few changes to avoid bugs, but they basically boil down to: When we scroll by an entire viewport worth of content, we must ensure that the scroll offset is 0, because otherwise the scroll rect (that's basically the viewport, but excluding the scroll offset) will end up being empty, which the `Present1` API chokes on. This commit avoids this situation by shuffling around some code to first calculate the dirty rows, _then_ check if it affects all of them and in that case sets the scroll offset to 0, and only then finally actually does any scrolling if there's still something to scroll. ## Validation Steps Performed * Start pwsh * Zoom in twice with Ctrl+Scrollwheel * Print a few viewports worth of text * Press Ctrl+L * No errors ✅ --- <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:30 +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#30549