[PR #3458] [CLOSED] Introduce RenderClusterIterator #25372

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3458
Author: @skyline75489
Created: 11/6/2019
Status: Closed

Base: masterHead: fix/renderClusterIter


📝 Commits (10+)

📊 Changes

24 files changed (+508 additions, -171 deletions)

View changed files

📝 src/buffer/out/textBufferCellIterator.cpp (+1 -1)
📝 src/host/ut_host/VtRendererTests.cpp (+54 -35)
📝 src/renderer/base/Cluster.cpp (+2 -2)
src/renderer/base/RenderClusterIterator.cpp (+216 -0)
📝 src/renderer/base/lib/base.vcxproj (+4 -2)
📝 src/renderer/base/lib/base.vcxproj.filters (+6 -0)
📝 src/renderer/base/renderer.cpp (+13 -35)
📝 src/renderer/dx/CustomTextLayout.cpp (+42 -1)
📝 src/renderer/dx/CustomTextLayout.h (+14 -7)
📝 src/renderer/dx/DxRenderer.cpp (+3 -3)
📝 src/renderer/dx/DxRenderer.hpp (+3 -1)
📝 src/renderer/gdi/gdirenderer.hpp (+6 -3)
📝 src/renderer/gdi/paint.cpp (+34 -39)
📝 src/renderer/gdi/state.cpp (+1 -9)
📝 src/renderer/inc/Cluster.hpp (+4 -4)
📝 src/renderer/inc/IRenderEngine.hpp (+2 -2)
src/renderer/inc/RenderClusterIterator.hpp (+59 -0)
📝 src/renderer/uia/UiaRenderer.cpp (+2 -2)
📝 src/renderer/uia/UiaRenderer.hpp (+1 -1)
📝 src/renderer/vt/XtermEngine.cpp (+4 -4)

...and 4 more files

📄 Description

Summary of the Pull Request

This is the successor of #3438 . The idea is based on @miniksa 's comment originally posted here https://github.com/microsoft/terminal/pull/3438#issuecomment-550058212

We could perhaps wrap a TextBufferCellIterator into a RenderClusterIterator, tell the RenderClusterIterator that it needs to return operator bool() as false when the underlying TextBufferCellIterator::TextAttr changes on increment, and provides accessors only for the character string and column string into the underlying cell iterator (which is a view directly into the text buffer).

References

#3075 #3438

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

This is still WIP, though. Would love to hear everybody's feedback.

Validation Steps Performed

Just pretty much everything should be validated. Vim, cat, top, cmatrix, and so on.


🔄 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/3458 **Author:** [@skyline75489](https://github.com/skyline75489) **Created:** 11/6/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/renderClusterIter` --- ### 📝 Commits (10+) - [`85f1acc`](https://github.com/microsoft/terminal/commit/85f1accbb9a82429758c11d9bf07db2800abaa5e) Init RenderClusterIterator - [`29e2089`](https://github.com/microsoft/terminal/commit/29e20897c86c5911b4f445435c793122946eff4d) Change for review - [`6d2a99b`](https://github.com/microsoft/terminal/commit/6d2a99bd7894668a499e22d5c0eb709101af8a77) What is this... - [`f8df455`](https://github.com/microsoft/terminal/commit/f8df4554915fd81af3c57ec7332f6a4824be6906) Tests - [`6c16878`](https://github.com/microsoft/terminal/commit/6c168781e584ea385859b4bd370ec215569a706e) Try to make GDI work - [`a6dc9ab`](https://github.com/microsoft/terminal/commit/a6dc9ab807d447707351494618debf16a8df9032) Make GDI+ work - [`6cec21f`](https://github.com/microsoft/terminal/commit/6cec21f66c30079425444ce8567474394b53c2a8) Make use of _Inout_ parameter - [`c0df551`](https://github.com/microsoft/terminal/commit/c0df55152394a313a667b2636cf2355ef91f6f8d) Take care of GDI+ - [`dd7ac04`](https://github.com/microsoft/terminal/commit/dd7ac04c6170e2bb16dbf4c37db4a08edaed8916) Try to make test work - [`7d0ec5c`](https://github.com/microsoft/terminal/commit/7d0ec5c9ea7731dab2e0e076b958e91a84ccfad6) Tests are green now ### 📊 Changes **24 files changed** (+508 additions, -171 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/textBufferCellIterator.cpp` (+1 -1) 📝 `src/host/ut_host/VtRendererTests.cpp` (+54 -35) 📝 `src/renderer/base/Cluster.cpp` (+2 -2) ➕ `src/renderer/base/RenderClusterIterator.cpp` (+216 -0) 📝 `src/renderer/base/lib/base.vcxproj` (+4 -2) 📝 `src/renderer/base/lib/base.vcxproj.filters` (+6 -0) 📝 `src/renderer/base/renderer.cpp` (+13 -35) 📝 `src/renderer/dx/CustomTextLayout.cpp` (+42 -1) 📝 `src/renderer/dx/CustomTextLayout.h` (+14 -7) 📝 `src/renderer/dx/DxRenderer.cpp` (+3 -3) 📝 `src/renderer/dx/DxRenderer.hpp` (+3 -1) 📝 `src/renderer/gdi/gdirenderer.hpp` (+6 -3) 📝 `src/renderer/gdi/paint.cpp` (+34 -39) 📝 `src/renderer/gdi/state.cpp` (+1 -9) 📝 `src/renderer/inc/Cluster.hpp` (+4 -4) 📝 `src/renderer/inc/IRenderEngine.hpp` (+2 -2) ➕ `src/renderer/inc/RenderClusterIterator.hpp` (+59 -0) 📝 `src/renderer/uia/UiaRenderer.cpp` (+2 -2) 📝 `src/renderer/uia/UiaRenderer.hpp` (+1 -1) 📝 `src/renderer/vt/XtermEngine.cpp` (+4 -4) _...and 4 more files_ </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request This is the successor of #3438 . The idea is based on @miniksa 's comment originally posted here https://github.com/microsoft/terminal/pull/3438#issuecomment-550058212 > We could perhaps wrap a TextBufferCellIterator into a RenderClusterIterator, tell the RenderClusterIterator that it needs to return operator bool() as false when the underlying TextBufferCellIterator::TextAttr changes on increment, and provides accessors only for the character string and column string into the underlying cell iterator (which is a view directly into the text buffer). <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References #3075 #3438 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments This is still WIP, though. Would love to hear everybody's feedback. <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Just pretty much everything should be validated. Vim, cat, top, cmatrix, and so on. --- <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:09:07 +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#25372