[PR #5550] [MERGED] Don't remove spaces when printing a new bottom line with a background color #26355

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5550
Author: @zadjii-msft
Created: 4/24/2020
Status: Merged
Merged: 4/30/2020
Merged by: @undefined

Base: masterHead: dev/migrie/b/5502-background-colors-after-circling


📝 Commits (7)

  • 3b7c7b5 HAHA Finally got the test working. This is dirty code but it finally works
  • b4b81cb lets clean this test up dramatically
  • e771208 I supose this fixes it?
  • 71b73d6 cleanup for review
  • c4820af good bot
  • 325d730 Merge remote-tracking branch 'origin/master' into dev/migrie/b/5502-background-colors-after-circling
  • b28ba07 This makes me hate things

📊 Changes

6 files changed (+195 additions, -1 deletions)

View changed files

📝 .github/actions/spell-check/whitelist/alphabet.txt (+1 -0)
📝 src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp (+129 -0)
📝 src/cascadia/UnitTests_TerminalCore/TestUtils.h (+46 -0)
📝 src/renderer/vt/XtermEngine.cpp (+10 -0)
📝 src/renderer/vt/paint.cpp (+8 -1)
📝 src/renderer/vt/vtrenderer.hpp (+1 -0)

📄 Description

Turns out we're still being a bit too aggressive when removing spaces.
If there are spaces at the end of the first run painted to a bottom
line, and the bottom line was a different color than the previous,
then we can't trim those spaces off the string. We still need to emit
those to make sure the terminal has colored spaces in it as well.

References

  • there's like 80 PRs in the last month for this function

PR Checklist

Validation Steps

  • ran the tests
  • checked that vtpipeterm still worked
  • Checked that the bug was fixed in the Terminal

🔄 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/5550 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 4/24/2020 **Status:** ✅ Merged **Merged:** 4/30/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/migrie/b/5502-background-colors-after-circling` --- ### 📝 Commits (7) - [`3b7c7b5`](https://github.com/microsoft/terminal/commit/3b7c7b58d963a2795de802039f0b08ba2fc5a244) HAHA Finally got the test working. This is dirty code but it finally works - [`b4b81cb`](https://github.com/microsoft/terminal/commit/b4b81cb0611d4d5382e576b047b40130a18cecb7) lets clean this test up dramatically - [`e771208`](https://github.com/microsoft/terminal/commit/e771208ad80e0dbf57d609a9e7639e87ac7e51cf) I supose this fixes it? - [`71b73d6`](https://github.com/microsoft/terminal/commit/71b73d6bbefbcddb00e8fa59a98a5836ec002562) cleanup for review - [`c4820af`](https://github.com/microsoft/terminal/commit/c4820afec07380dd9fc500a8abbdf80620581234) good bot - [`325d730`](https://github.com/microsoft/terminal/commit/325d730ad22d404980f210126b66bef32e3edd46) Merge remote-tracking branch 'origin/master' into dev/migrie/b/5502-background-colors-after-circling - [`b28ba07`](https://github.com/microsoft/terminal/commit/b28ba07ff812412d79148aff163b7046c1595ce8) This makes me hate things ### 📊 Changes **6 files changed** (+195 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spell-check/whitelist/alphabet.txt` (+1 -0) 📝 `src/cascadia/UnitTests_TerminalCore/ConptyRoundtripTests.cpp` (+129 -0) 📝 `src/cascadia/UnitTests_TerminalCore/TestUtils.h` (+46 -0) 📝 `src/renderer/vt/XtermEngine.cpp` (+10 -0) 📝 `src/renderer/vt/paint.cpp` (+8 -1) 📝 `src/renderer/vt/vtrenderer.hpp` (+1 -0) </details> ### 📄 Description Turns out we're still being a bit too aggressive when removing spaces. If there are spaces at the end of the first run painted to a bottom line, _and the bottom line was a different color than the previous_, then we can't trim those spaces off the string. We still need to emit those to make sure the terminal has colored spaces in it as well. ## References * there's like 80 PRs in the last month for this function ## PR Checklist * [x] Closes #5502 * [x] I work here * [x] Tests added/passed ## Validation Steps * [x] ran the tests * [x] checked that vtpipeterm still worked * [x] Checked that the bug was fixed in the Terminal --- <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:15:33 +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#26355