[PR #13784] [MERGED] AtlasEngine: Fix the fix for LRU state after scrolling #29765

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/13784
Author: @lhecker
Created: 8/19/2022
Status: Merged
Merged: 8/20/2022
Merged by: @undefined

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


📝 Commits (1)

  • 009b38a AtlasEngine: Fix the fix for LRU state after scrolling

📊 Changes

1 file changed (+33 additions, -23 deletions)

View changed files

📝 src/renderer/atlas/AtlasEngine.cpp (+33 -23)

📄 Description

The absolute disgrace of a fix called 65b71ff failed to account for std::move
being unsafe to use for overlapping ranges. While std::move works for trivial
types (it happens to delegate to memmove), we need to dynamically switch
between that and std::move_backward to be correct.

Without this fix the LRU refresh is incorrect and might lead to crashes.

Validation Steps Performed

I'm working on a new, pure D2D renderer inside AtlasEngine, which uses
the iterators contained in _r.cellGlyphMapping to draw text.
I noticed the bug, because scrolling up caused the text to be garbled
and with this fix applied it works as expected.


🔄 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/13784 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 8/19/2022 **Status:** ✅ Merged **Merged:** 8/20/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/atlas-engine-fixup` --- ### 📝 Commits (1) - [`009b38a`](https://github.com/microsoft/terminal/commit/009b38ab76ed6dbad3ba362abec3bd1441df2d84) AtlasEngine: Fix the fix for LRU state after scrolling ### 📊 Changes **1 file changed** (+33 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/atlas/AtlasEngine.cpp` (+33 -23) </details> ### 📄 Description The absolute disgrace of a fix called 65b71ff failed to account for `std::move` being unsafe to use for overlapping ranges. While `std::move` works for trivial types (it happens to delegate to `memmove`), we need to dynamically switch between that and `std::move_backward` to be correct. Without this fix the LRU refresh is incorrect and might lead to crashes. ## Validation Steps Performed I'm working on a new, pure D2D renderer inside AtlasEngine, which uses the iterators contained in `_r.cellGlyphMapping` to draw text. I noticed the bug, because scrolling up caused the text to be garbled and with this fix applied it works as expected. --- <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:36:47 +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#29765