A "break" is automatically inserted when copying and pasting multiple lines #5336

Closed
opened 2026-01-31 00:10:54 +00:00 by claunia · 8 comments
Owner

Originally created by @lipan6461188 on GitHub (Dec 2, 2019).

When I copy a Python function and paste it into Terminal, it always insert a "break" character automatically.

def sayhello():
    X = 12
    print("HELLO")
    return X

微信截图_20191202122402

Originally created by @lipan6461188 on GitHub (Dec 2, 2019). When I copy a Python function and paste it into Terminal, it always insert a "break" character automatically. ```python def sayhello(): X = 12 print("HELLO") return X ``` ![微信截图_20191202122402](https://user-images.githubusercontent.com/9022807/69930510-ae7e8f80-14fe-11ea-9f92-fa1da7387428.png)
claunia added the Resolution-Duplicate label 2026-01-31 00:10:54 +00:00
Author
Owner

@mkitzan commented on GitHub (Dec 2, 2019):

I was unable to repro this issue in the Python 2 and 3 interpreters on my machine in WSL, CMD, and PowerShell terminals. The copy-paste worked fine, and I did not have the same issues as your examples.
Could you provide info about the following:

  • Windows Terminal version
  • Windows OS version
  • Python version(s)
  • The terminal type you performed the copy-paste in (CMD, WSL..)
  • The source of the text you copy-pasted (I'm worried GitHub threw out line breaks in the issue text)
@mkitzan commented on GitHub (Dec 2, 2019): I was unable to repro this issue in the Python 2 and 3 interpreters on my machine in WSL, CMD, and PowerShell terminals. The copy-paste worked fine, and I did not have the same issues as your examples. Could you provide info about the following: - Windows Terminal version - Windows OS version - Python version(s) - The terminal type you performed the copy-paste in (CMD, WSL..) - The source of the text you copy-pasted (I'm worried GitHub threw out line breaks in the issue text)
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 2, 2019):

What version of Windows Terminal are you using? We cannot help you if you do not use the bug template.

@DHowett-MSFT commented on GitHub (Dec 2, 2019): What version of Windows Terminal are you using? _We cannot help you if you do not use the bug template._
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 2, 2019):

Oh, thanks @mkitzan!

@DHowett-MSFT commented on GitHub (Dec 2, 2019): Oh, thanks @mkitzan!
Author
Owner

@mkitzan commented on GitHub (Dec 2, 2019):

Haha, quick draw @DHowett

@mkitzan commented on GitHub (Dec 2, 2019): Haha, quick draw @DHowett
Author
Owner

@lipan6461188 commented on GitHub (Dec 2, 2019):

Thanks for your quick responses. @DHowett-MSFT @mkitzan
Actually, the above problem only occured under Ubuntu subsystem in Windows. I think it has nothing to do with Python, because when I paste a bash function and it also inserts a "break" automatically.

Terminal version: "Windows Terminal (Preview) 0.6.2951.0".
Windows version: Windows 10 (1903) 18362.476
Python version: Python 2.7
Ubuntu: Linux LiPanPC 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
Terminal type: I copy from Sublime and paste in Windows Terminal (Preview).
1
2

@lipan6461188 commented on GitHub (Dec 2, 2019): Thanks for your quick responses. @DHowett-MSFT @mkitzan Actually, the above problem only occured under Ubuntu subsystem in Windows. I think it has nothing to do with Python, because when I paste a bash function and it also inserts a "break" automatically. Terminal version: "Windows Terminal (Preview) 0.6.2951.0". Windows version: Windows 10 (1903) 18362.476 Python version: Python 2.7 Ubuntu: Linux LiPanPC 4.4.0-18362-Microsoft #476-Microsoft Fri Nov 01 16:53:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux Terminal type: I copy from Sublime and paste in Windows Terminal (Preview). ![1](https://user-images.githubusercontent.com/9022807/69934438-d83eb300-150c-11ea-8c4a-8573ed1bdc54.png) ![2](https://user-images.githubusercontent.com/9022807/69934440-d8d74980-150c-11ea-8d31-5ca3bf808046.png)
Author
Owner

@DHowett-MSFT commented on GitHub (Dec 2, 2019):

This was fixed in 0.7.3291.0 and is a /dupe of #1091. Please upgrade.

@DHowett-MSFT commented on GitHub (Dec 2, 2019): This was fixed in 0.7.3291.0 and is a /dupe of #1091. Please upgrade.
Author
Owner

@ghost commented on GitHub (Dec 2, 2019):

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 (Dec 2, 2019): 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!
Author
Owner

@lipan6461188 commented on GitHub (Dec 2, 2019):

Thank you very much. It solved my problem is solved. I thought Windows Terminal could update automatically

@lipan6461188 commented on GitHub (Dec 2, 2019): Thank you very much. It solved my problem is solved. I thought Windows Terminal could update automatically
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5336