[PR #14677] [MERGED] Prevent flickering in nushell due to FTCS marks #30209

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/14677
Author: @zadjii-msft
Created: 1/13/2023
Status: Merged
Merged: 5/11/2023
Merged by: @DHowett

Base: mainHead: dev/migrie/b/13710-ftcs-flushing


📝 Commits (10+)

  • ba777df This doesn't seem to flash in debug anymore. Lemme double-check release and be sure.
  • 12053fe comments
  • 9bb2bcb spel
  • f440101 format doesn't like this does it
  • a70aae0 Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing
  • 9784835 Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing
  • 35745f4 Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing
  • c2fc931 reword comments for clarity
  • 392d5c5 fluch
  • 7b8d712 Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing

📊 Changes

5 files changed (+33 additions, -12 deletions)

View changed files

📝 src/host/screenInfo.cpp (+4 -1)
📝 src/renderer/vt/XtermEngine.cpp (+9 -10)
📝 src/renderer/vt/invalidate.cpp (+4 -0)
📝 src/renderer/vt/paint.cpp (+15 -1)
📝 src/renderer/vt/vtrenderer.hpp (+1 -0)

📄 Description

Tl;dr: Conpty would flush a frame whenever it encountered a FTCS mark. Combine that with the whole-line redrawing that nushell does, and the Terminal would get the prompt in two frames instead of one, causing a slight flickering. This fixes that by rendering the frame, but not flushing to the pipe when we encounter one of these sequences.

Closes #13710

A complication here: there are some sequences that we passthrough immediately when we encounter them. For example, \x1b[ 2q. we need to also not flush when we encounter one of these sequences. nushell emits one of these as a part of the prompt, and that would force the buffered frame to get written anyways, before writing that to the pipe.


🔄 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/14677 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 1/13/2023 **Status:** ✅ Merged **Merged:** 5/11/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/migrie/b/13710-ftcs-flushing` --- ### 📝 Commits (10+) - [`ba777df`](https://github.com/microsoft/terminal/commit/ba777dfbf6d80f0bbea97945654c8e6c0437cb65) This doesn't seem to flash in debug anymore. Lemme double-check release and be sure. - [`12053fe`](https://github.com/microsoft/terminal/commit/12053fe8b30069f10fcd1b37ef6fdeaa00a68fdd) comments - [`9bb2bcb`](https://github.com/microsoft/terminal/commit/9bb2bcbd1960c4b6e57244ebc5c832d7c024b3c0) spel - [`f440101`](https://github.com/microsoft/terminal/commit/f440101bf443fe8a3e0f40eb061a7d602939e19f) format doesn't like this does it - [`a70aae0`](https://github.com/microsoft/terminal/commit/a70aae01c4233f3995693f05548a7db6eb7e6e21) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing - [`9784835`](https://github.com/microsoft/terminal/commit/9784835403afd0291053838e7d4677932e97b195) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing - [`35745f4`](https://github.com/microsoft/terminal/commit/35745f41b4842f5a3141a220d5a271b71702d7a9) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing - [`c2fc931`](https://github.com/microsoft/terminal/commit/c2fc9314c5f91d0b01918e0f7dd152501a60f9a6) reword comments for clarity - [`392d5c5`](https://github.com/microsoft/terminal/commit/392d5c5cf96d5b826081331faff7093d576ca587) fluch - [`7b8d712`](https://github.com/microsoft/terminal/commit/7b8d71200582d5e69e82e5b1b04305495a3b3fce) Merge remote-tracking branch 'origin/main' into dev/migrie/b/13710-ftcs-flushing ### 📊 Changes **5 files changed** (+33 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `src/host/screenInfo.cpp` (+4 -1) 📝 `src/renderer/vt/XtermEngine.cpp` (+9 -10) 📝 `src/renderer/vt/invalidate.cpp` (+4 -0) 📝 `src/renderer/vt/paint.cpp` (+15 -1) 📝 `src/renderer/vt/vtrenderer.hpp` (+1 -0) </details> ### 📄 Description Tl;dr: Conpty would flush a frame whenever it encountered a FTCS mark. Combine that with the whole-line redrawing that nushell does, and the Terminal would get the prompt in two frames instead of one, causing a slight flickering. This fixes that by rendering the frame, but not flushing to the pipe when we encounter one of these sequences. Closes #13710 A complication here: there are some sequences that we passthrough _immediately_ when we encounter them. For example, `\x1b[ 2q`. we need to also not flush when we encounter one of these sequences. nushell emits one of these as a part of the prompt, and that would force the buffered frame to get written _anyways_, before writing that to the pipe. --- <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:39:21 +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#30209