Skip to content

Some characters are dropped when paste from clipboard #18724

@og900aero

Description

@og900aero

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)"

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-BugIt either shouldn't be doing this or needs an investigation.Resolution-DuplicateThere's another issue on the tracker that's pretty much the same thing.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions