[PR #2144] [MERGED] VT sequence support for EraseInLine, EraseInDisplay, DeleteCharacter and InsertCharacter #24821

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/2144
Author: @PankajBhojwani
Created: 7/30/2019
Status: Merged
Merged: 7/31/2019
Merged by: @PankajBhojwani

Base: masterHead: VTSeq


📝 Commits (5)

  • 7b15c18 some VT sequences
  • 9a4987d formatting changes
  • 98d3661 fixed DeleteCharacter not retaining text attributes when rewriting, addressed reviewer comments
  • 7e452c0 implemented insert character, addressed comments
  • 87da48d minor edits

📊 Changes

7 files changed (+316 additions, -11 deletions)

View changed files

📝 src/buffer/out/textBuffer.cpp (+20 -5)
📝 src/buffer/out/textBuffer.hpp (+1 -0)
📝 src/cascadia/TerminalCore/ITerminalApi.hpp (+4 -0)
📝 src/cascadia/TerminalCore/Terminal.hpp (+4 -0)
📝 src/cascadia/TerminalCore/TerminalApi.cpp (+227 -1)
📝 src/cascadia/TerminalCore/TerminalDispatch.cpp (+54 -4)
📝 src/cascadia/TerminalCore/TerminalDispatch.hpp (+6 -1)

📄 Description

Summary of the Pull Request

Implemented the following VT sequences:

  • EraseInLine
  • EraseInDisplay
  • DeleteCharacter
  • InsertCharacter

(Minor: implemented CursorUp and CursorBackward in TerminalDispatch with existing APIs)

References

Related to #1883

PR Checklist

  • 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

Without these VT sequences, non-Conhost connections behave strangely (since they do not go through conpty for VT parsing).

Validation Steps Performed

Compared behaviour with putty/other terminals and imitated them


🔄 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/2144 **Author:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Created:** 7/30/2019 **Status:** ✅ Merged **Merged:** 7/31/2019 **Merged by:** [@PankajBhojwani](https://github.com/PankajBhojwani) **Base:** `master` ← **Head:** `VTSeq` --- ### 📝 Commits (5) - [`7b15c18`](https://github.com/microsoft/terminal/commit/7b15c18d15b97141cfa3dbcda56b6a8fccfe9c77) some VT sequences - [`9a4987d`](https://github.com/microsoft/terminal/commit/9a4987d1212f7ae2e0432775e3a978ec6b896b71) formatting changes - [`98d3661`](https://github.com/microsoft/terminal/commit/98d366115722193375ea63040b068f4ab954428c) fixed DeleteCharacter not retaining text attributes when rewriting, addressed reviewer comments - [`7e452c0`](https://github.com/microsoft/terminal/commit/7e452c05ba9cf72521b15b1e39ca68d15f4ec0bb) implemented insert character, addressed comments - [`87da48d`](https://github.com/microsoft/terminal/commit/87da48dad91c6ea2f29fad8136087c09606fb73b) minor edits ### 📊 Changes **7 files changed** (+316 additions, -11 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/textBuffer.cpp` (+20 -5) 📝 `src/buffer/out/textBuffer.hpp` (+1 -0) 📝 `src/cascadia/TerminalCore/ITerminalApi.hpp` (+4 -0) 📝 `src/cascadia/TerminalCore/Terminal.hpp` (+4 -0) 📝 `src/cascadia/TerminalCore/TerminalApi.cpp` (+227 -1) 📝 `src/cascadia/TerminalCore/TerminalDispatch.cpp` (+54 -4) 📝 `src/cascadia/TerminalCore/TerminalDispatch.hpp` (+6 -1) </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 Implemented the following VT sequences: - EraseInLine - EraseInDisplay - DeleteCharacter - InsertCharacter (Minor: implemented CursorUp and CursorBackward in TerminalDispatch with existing APIs) <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References Related to #1883 <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [X] 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 Without these VT sequences, non-Conhost connections behave strangely (since they do not go through conpty for VT parsing). <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Compared behaviour with putty/other terminals and imitated them --- <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:05: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#24821