microsoft / microsoft/PowerToys

Paste as plain text not working as well as it used to

Open
#45,574 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Issue-Bug Needs-Triage Product-Advanced Paste
Dominant language
C
Stars
139k
Forks
8.6k
PR merge metrics
PR metrics pending

Description

Microsoft PowerToys version

v0.97.2

Installation method

PowerToys auto-update

Area(s) with issue?

Advanced Paste

Steps to reproduce

I'm sure this feature used to trim whitespace from before and after the text but it does not anymore.
As a result, when I copy a single line of text from some applications and use Paste As Plain Text (either through the hotkey or through the menu), I can get multiple lines in the output.
I use this feature all the time to copy and paste commit messages from a git extensions and it used to give me a single line, but now it puts line feeds before the plain text.
Shouldn't this be trimming the plain text? I'm not sure if I'm imagining things or if something has changed.

✔️ Expected Behavior

When pasting as plain text, the text should be trimmed at the start and end.

❌ Actual Behavior

For a single line of text that has been copied, I get multiple lines of text when I paste as plain text

Additional Information

Edition Windows 11 Pro
Version 25H2
OS build 26200.7840
Experience Windows Feature Experience Pack 1000.26100.291.0

Other Software
  • Git Extensions 3.5.4.12724
  • Build 65f01f39982ccb121c4df7d4b00b506939553958
  • Git 2.47.1.windows.2
  • Microsoft Windows NT 10.0.26200.0
  • .NET Framework 4.8.9221.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing Advanced Paste with a single line copied from Git Extensions, using both the hotkey and menu. Trace the plain-text paste handling and any existing tests for whitespace behavior. Done means leading and trailing whitespace is trimmed so a single-line copy pastes as one line.

Written by the indexing model from the issue text.

Assessment

Tech stack
git
Domain
desktop
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.