Pasting Still Badly Broken From Windows to Ubuntu: Extra Line Endings and Indents #6862

Open
opened 2026-01-31 00:49:12 +00:00 by claunia · 0 comments
Owner

Originally created by @FlipperPA on GitHub (Mar 14, 2020).

Environment

Windows build number: 10.0.19041.113
Windows Terminal version (if applicable): 0.9.433.0

Any other software? Ubuntu 18.04, mainly used for Python 3 development.

Steps to reproduce

Create a few lines of code in a text editor, such as Sublime or Notepad, and COPY it:
image

Result of pasting into a Terminal with an ipython shell open:
image
** NOTE THE EXTRA LINE FEEDS AND INDENTATION! **

Result of pasting into a Terminal with vi open:
image
** NOTE THE EXTRA LINE FEEDS AND INDENTATION! **

Result of pasting the same text buffer into PuTTY with an ipython shell open:
image
** It looks perfect! Beautiful! **

Result of pasting the same text buffer into PuTTY with the vi editor open:
image
** It looks perfect! Beautiful! **

The same behavior happens with emacs, pico, vim - not just vi and ipython.

Expected behavior

For the copied buffer to properly paste, like it does in PuTTY, without extra line endings and indents.

Please note that the same text buffer pasted into a PowerShell window works:
image

Actual behavior

See the above screenshots. I end up having to paste code from scratch text editors on Windows into Windows Terminal Preview line-by-line. This gets very old, very fast!

Thanks for your efforts, this is shaping up to be a great product. This is my one, huge, major pain point.

Originally created by @FlipperPA on GitHub (Mar 14, 2020). # Environment ```none Windows build number: 10.0.19041.113 Windows Terminal version (if applicable): 0.9.433.0 Any other software? Ubuntu 18.04, mainly used for Python 3 development. ``` # Steps to reproduce Create a few lines of code in a text editor, such as Sublime or Notepad, and COPY it: ![image](https://user-images.githubusercontent.com/68164/76671215-3a2aa200-656b-11ea-8d6f-e96db5b127e2.png) Result of pasting into a Terminal with an `ipython` shell open: ![image](https://user-images.githubusercontent.com/68164/76671256-73631200-656b-11ea-891f-2ef3baa655e9.png) ** NOTE THE EXTRA LINE FEEDS AND INDENTATION! ** Result of pasting into a Terminal with `vi` open: ![image](https://user-images.githubusercontent.com/68164/76671383-64309400-656c-11ea-9be1-edc28ebc8f69.png) ** NOTE THE EXTRA LINE FEEDS AND INDENTATION! ** Result of pasting the same text buffer into PuTTY with an `ipython` shell open: ![image](https://user-images.githubusercontent.com/68164/76671289-c210ac00-656b-11ea-9ef1-2711847ee0c0.png) ** It looks perfect! Beautiful! ** Result of pasting the same text buffer into PuTTY with the `vi` editor open: ![image](https://user-images.githubusercontent.com/68164/76671413-8a563400-656c-11ea-805f-d685828adaae.png) ** It looks perfect! Beautiful! ** The same behavior happens with `emacs`, `pico`, `vim` - not just `vi` and `ipython`. # Expected behavior For the copied buffer to properly paste, like it does in PuTTY, without extra line endings and indents. Please note that the same text buffer pasted into a PowerShell window works: ![image](https://user-images.githubusercontent.com/68164/76671468-e91bad80-656c-11ea-948a-dffd7b557c89.png) # Actual behavior See the above screenshots. I end up having to paste code from scratch text editors on Windows into Windows Terminal Preview line-by-line. This gets very old, very fast! Thanks for your efforts, this is shaping up to be a great product. This is my one, huge, major pain point.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#6862