[PR #3314] [CLOSED] Replace \r\n with \r to get rid of double newlines #25309

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/3314
Author: @ShutterQuick
Created: 10/24/2019
Status: Closed

Base: masterHead: feature/stripNewline


📝 Commits (1)

  • 7298025 Replace \r\n with \r to get rid of double newlines

📊 Changes

2 files changed (+15 additions, -1 deletions)

View changed files

📝 src/cascadia/TerminalControl/TermControl.cpp (+14 -1)
📝 src/cascadia/TerminalControl/TermControl.h (+1 -0)

📄 Description

Summary of the Pull Request

Continuation of https://github.com/microsoft/terminal/pull/2390
As this MR seems to have been abandoned, I'm opening a new one with the same change.
As per the discussion in #2390, unconditionally replace \r\n with \r.

References

https://github.com/microsoft/terminal/pull/2390
https://github.com/microsoft/terminal/pull/1094
https://github.com/microsoft/terminal/issues/1091

PR Checklist

  • Closes Ligatures do not render under cursor column in Vim (#1091)
  • 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

I'm sure I'm not the only one going insane from hitting this bug all the time.
Please let me know what extra steps I need to take with this MR to get it merged.

Rudely CC-ing @DHowett-MSFT, who seems to have been active on #2390.

Validation Steps Performed

No unit tests are added.

Manually verified the terminal to, with this patch, have the same behavior as the built in Windows Command Prompt by writing a program that list out what keys are pressed, and then paste

a
b
c
d

From left to right: 0.5.2762.0, this branch, Windows built in Command Prompt.
image

Manually tested that pasting now works as expected in vim both on Windows and WSL2.


🔄 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/3314 **Author:** [@ShutterQuick](https://github.com/ShutterQuick) **Created:** 10/24/2019 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/stripNewline` --- ### 📝 Commits (1) - [`7298025`](https://github.com/microsoft/terminal/commit/7298025b9c2979293008a163ab82d5a8b67a29c9) Replace \r\n with \r to get rid of double newlines ### 📊 Changes **2 files changed** (+15 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+14 -1) 📝 `src/cascadia/TerminalControl/TermControl.h` (+1 -0) </details> ### 📄 Description ## Summary of the Pull Request Continuation of https://github.com/microsoft/terminal/pull/2390 As this MR seems to have been abandoned, I'm opening a new one with the same change. As per the discussion in #2390, unconditionally replace `\r\n` with `\r`. ## References https://github.com/microsoft/terminal/pull/2390 https://github.com/microsoft/terminal/pull/1094 https://github.com/microsoft/terminal/issues/1091 ## PR Checklist * [X] Closes #1091 * [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 ## Detailed Description of the Pull Request / Additional comments I'm sure I'm not the only one going insane from hitting this bug all the time. Please let me know what extra steps I need to take with this MR to get it merged. Rudely CC-ing @DHowett-MSFT, who seems to have been active on #2390. ## Validation Steps Performed No unit tests are added. Manually verified the terminal to, with this patch, have the same behavior as the built in Windows Command Prompt by writing a program that list out what keys are pressed, and then paste ``` a b c d ``` From left to right: 0.5.2762.0, this branch, Windows built in Command Prompt. ![image](https://user-images.githubusercontent.com/2367571/67499154-e2090700-f680-11e9-8907-43dfd653d4c1.png) Manually tested that pasting now works as expected in vim both on Windows and WSL2. --- <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:08:40 +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#25309