Extra characters come along with a paste #18832

Closed
opened 2026-01-31 06:25:42 +00:00 by claunia · 4 comments
Owner

Originally created by @szalapski on GitHub (Nov 4, 2022).

Windows Terminal version

1.16.2641.0

Windows build number

10.0.19044.2130

Other Software

ohmyposh
Powershell Core 7.2.6

Steps to reproduce

  1. I wrote a C# .NET 6 self-hosted web app that accepts interactive input from a Console.ReadLine(); statement. I run the app in Windows Terminal via Powershell Core.
  2. When I come to that prompt, I paste in any string copied from notepad, such as foo

Expected Behavior

It should paste exactly what was copied; in this example, foo.

Actual Behavior

I notice that something has prepended and appended other characters in what I have pasted. If I copy foo out of notepad and paste in Windows Terminal, I get 00~foo01~ actually pasted, which causes problems unless I manually fix it.

This only happens when running inside my web app host in Windows Terminal via Powershell Core.

  • When I paste in Windows Terminal at a powershell prompt outside of this app, it does not happen (pastes foo properly).
  • When I run this app in Windows Terminal via Command Prompt it does not happen (pastes foo properly).
  • When I run this app in Powershell in Windows outside of Windows Terminal, it doesn't happen (pastes foo properly).
Originally created by @szalapski on GitHub (Nov 4, 2022). ### Windows Terminal version 1.16.2641.0 ### Windows build number 10.0.19044.2130 ### Other Software ohmyposh Powershell Core 7.2.6 ### Steps to reproduce 1. I wrote a C# .NET 6 self-hosted web app that accepts interactive input from a `Console.ReadLine();` statement. I run the app in Windows Terminal via Powershell Core. 2. When I come to that prompt, I paste in any string copied from notepad, such as `foo` ### Expected Behavior It should paste exactly what was copied; in this example, `foo`. ### Actual Behavior I notice that something has prepended and appended other characters in what I have pasted. If I copy `foo` out of notepad and paste in Windows Terminal, I get `00~foo01~` actually pasted, which causes problems unless I manually fix it. This only happens when running inside my web app **host** in **Windows Terminal** via **Powershell** Core. - When I paste in Windows Terminal at a powershell prompt outside of this app, it does not happen (pastes `foo` properly). - When I run this app in Windows Terminal via Command Prompt it does not happen (pastes `foo` properly). - When I run this app in Powershell in Windows outside of Windows Terminal, it doesn't happen (pastes `foo` properly).
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 06:25:43 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Nov 4, 2022):

Which powershell, PsReadline, and oh-my-posh version are you using/? This has all the same flavors of #14129 (et al), though it does rule out ssh as the source of the regression

@zadjii-msft commented on GitHub (Nov 4, 2022): Which powershell, PsReadline, and oh-my-posh version are you using/? This has all the same flavors of #14129 (et al), though it does rule out `ssh` as the source of the regression
Author
Owner

@szalapski commented on GitHub (Nov 4, 2022):

Powershell Core 7.2.6

I don't remember using PsReadline, but maybe it goes along with oh-my-posh? How do I get the version I am running?

How do I get the version of oh-my-posh that I am using?

@szalapski commented on GitHub (Nov 4, 2022): Powershell Core 7.2.6 I don't remember using PsReadline, but maybe it goes along with oh-my-posh? How do I get the version I am running? How do I get the version of oh-my-posh that I am using?
Author
Owner

@zadjii-msft commented on GitHub (Nov 4, 2022):

Hmm, I'm guessing this wasn't oh-my-posh: https://github.com/JanDeDobbeleer/oh-my-posh/issues?q=is%3Aissue+bracketed

I should probably just redirect this to /dup #14129

@zadjii-msft commented on GitHub (Nov 4, 2022): Hmm, I'm guessing this wasn't oh-my-posh: https://github.com/JanDeDobbeleer/oh-my-posh/issues?q=is%3Aissue+bracketed I should probably just redirect this to /dup #14129
Author
Owner

@ghost commented on GitHub (Nov 4, 2022):

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost commented on GitHub (Nov 4, 2022): Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#18832