Some characters are dropped when paste from clipboard #23072

Closed
opened 2026-01-31 08:31:30 +00:00 by claunia · 3 comments
Owner

Originally created by @og900aero on GitHub (Mar 26, 2025).

Windows Terminal version

1.23.10732.0

Windows build number

10.0.26100.3476

Other Software

Debian 12 stable under WSL

Steps to reproduce

When you paste a text where the first character is one of the following, it will unpaste that character and put in some invisible character, because the cursor disappears there:
[ , ] , { , }

Example paste it to terminal, or text editor under terminal (nano, micro text editor etc):

[custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"

Expected Behavior

I should see this if everything is ok:

[custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"

Actual Behavior

I see problem:

In nano, micro or other text editor:

custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"

If use cat -A for this file, then following show:

$
^[custom.ansible]$
description = "Ansible version"$
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)$
when = """ test -n "${ANSIBLE_HOME}" """$
format = "[$symbol$output]($style) "$

If I copy directly to the terminal:

^[custom.ansible]
description = "Ansible version"
command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)
when = """ test -n "${ANSIBLE_HOME}" """
format = "[$symbol$output]($style)"
Originally created by @og900aero on GitHub (Mar 26, 2025). ### Windows Terminal version 1.23.10732.0 ### Windows build number 10.0.26100.3476 ### Other Software Debian 12 stable under WSL ### Steps to reproduce When you paste a text where the first character is one of the following, it will unpaste that character and put in some invisible character, because the cursor disappears there: [ , ] , { , } Example paste it to terminal, or text editor under terminal (nano, micro text editor etc): ``` [custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ``` ### Expected Behavior I should see this if everything is ok: ``` [custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ``` ### Actual Behavior I see problem: In nano, micro or other text editor: ``` custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ``` If use cat -A for this file, then following show: ``` $ ^[custom.ansible]$ description = "Ansible version"$ command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@)$ when = """ test -n "${ANSIBLE_HOME}" """$ format = "[$symbol$output]($style) "$ ``` If I copy directly to the terminal: ``` ^[custom.ansible] description = "Ansible version" command = "echo -n $(ansible --version 2>/dev/null | grep ^ansible | awk '{ print $2 }') $(which ansible | sed -e s@$HOME/@@ -e s@/bin/ansible@@ -e s@/.virtual_env@@) when = """ test -n "${ANSIBLE_HOME}" """ format = "[$symbol$output]($style)" ```
claunia added the Issue-BugResolution-Duplicate labels 2026-01-31 08:31:30 +00:00
Author
Owner

@similar-issues-ai[bot] commented on GitHub (Mar 26, 2025):

We've found some similar issues:

  • #18579 , similarity score: 81%

If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue.

Note: You can give me feedback by 👍 or 👎 this comment.

@similar-issues-ai[bot] commented on GitHub (Mar 26, 2025): We've found some similar issues: - #18579 , similarity score: 81% If any of the above are duplicates, please consider closing this issue out and adding additional context in the original issue. > Note: You can give me feedback by 👍 or 👎 this comment.
Author
Owner

@DHowett commented on GitHub (Mar 26, 2025):

Thanks! Yes, this looks like a /dupe of #18579.

@DHowett commented on GitHub (Mar 26, 2025): Thanks! Yes, this looks like a /dupe of #18579.
Author
Owner

@microsoft-github-policy-service[bot] commented on GitHub (Mar 26, 2025):

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!

@microsoft-github-policy-service[bot] commented on GitHub (Mar 26, 2025): 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! <!-- Policy app identification https://img.shields.io/static/v1?label=PullRequestIssueManagement. -->
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#23072