Bug Report - Pasting text adds new line between each line #1957

Closed
opened 2026-01-30 22:42:49 +00:00 by claunia · 2 comments
Owner

Originally created by @Taubin on GitHub (Jun 23, 2019).

Environment

Windows build number: Microsoft Windows [Version 10.0.18362.175]
Windows Terminal version (if applicable): 0.2.1715.0

Any other software? Ubuntu-18

Steps to reproduce

Open a new termanal window with the Ubuntu 18.04 app from the MS store. Copy a multi-line file from notepad or vs code. Paste the multi-line file into the terminal.

Expected behavior

I expect the file to paste as I have copied it, with no extra spaces or new lines added.

Actual behavior

The pasted file has new lines between each line when pasted.

Example:

Copy the following into terminal

version: '3'
services:
  gogs:
    image: gogs/gogs:latest
    ports:
      - "10022:22"
      - "3000:3000"
    volumes:
      - ./data/gogs:/data
    depends_on:
      - mysql
  mysql:
    image: mysql:5.7.16
    volumes:
      - ./gogs/mysql:/var/lib/mysql
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - 3308:3306
    environment:
      MYSQL_DATABASE: gogs

Results when pasted into terminal:

version: '3'                                                                                                                                                                                                                                                                                                                                    

services:                                                                                                                                                                                                                                                                                                                                         

gogs:                                                                                                                                                                      

    image: gogs/gogs:latest                                                                                                                                                                                                                                                                                                                         

ports:   

- "10022:22"         

- "3000:3000"         

volumes:

      - ./data/gogs:/data

    depends_on:

      - mysql

  mysql:

    image: mysql:5.7.16

    volumes:

      - ./gogs/mysql:/var/lib/mysql

      - /var/run/docker.sock:/var/run/docker.sock

    ports:

      - 3308:3306

    environment:

      MYSQL_ROOT_PASSWORD:

      MYSQL_DATABASE: gogs

      MYSQL_USER:

      MYSQL_PASSWORD:

      TZ: Pacific/Auckland
Originally created by @Taubin on GitHub (Jun 23, 2019). <!-- This bug tracker is monitored by Windows Terminal development team and other technical folks. **Important: When reporting BSODs or security issues, DO NOT attach memory dumps, logs, or traces to Github issues**. Instead, send dumps/traces to secure@microsoft.com, referencing this GitHub issue. Please use this form and describe your issue, concisely but precisely, with as much detail as possible. --> # Environment ```none Windows build number: Microsoft Windows [Version 10.0.18362.175] Windows Terminal version (if applicable): 0.2.1715.0 Any other software? Ubuntu-18 ``` # Steps to reproduce <!-- A description of how to trigger this bug. --> Open a new termanal window with the Ubuntu 18.04 app from the MS store. Copy a multi-line file from notepad or vs code. Paste the multi-line file into the terminal. # Expected behavior <!-- A description of what you're expecting, possibly containing screenshots or reference material. --> I expect the file to paste as I have copied it, with no extra spaces or new lines added. # Actual behavior <!-- What's actually happening? --> The pasted file has new lines between each line when pasted. Example: Copy the following into terminal ``` version: '3' services: gogs: image: gogs/gogs:latest ports: - "10022:22" - "3000:3000" volumes: - ./data/gogs:/data depends_on: - mysql mysql: image: mysql:5.7.16 volumes: - ./gogs/mysql:/var/lib/mysql - /var/run/docker.sock:/var/run/docker.sock ports: - 3308:3306 environment: MYSQL_DATABASE: gogs ``` Results when pasted into terminal: ``` version: '3' services: gogs: image: gogs/gogs:latest ports: - "10022:22" - "3000:3000" volumes: - ./data/gogs:/data depends_on: - mysql mysql: image: mysql:5.7.16 volumes: - ./gogs/mysql:/var/lib/mysql - /var/run/docker.sock:/var/run/docker.sock ports: - 3308:3306 environment: MYSQL_ROOT_PASSWORD: MYSQL_DATABASE: gogs MYSQL_USER: MYSQL_PASSWORD: TZ: Pacific/Auckland ```
Author
Owner

@wernersv commented on GitHub (Jun 23, 2019):

This seems to be related to the Windows line ending.
It doesn't happen to me if it is set to Unix .
Empty lines are inserted if the source uses <CR+LF>

@wernersv commented on GitHub (Jun 23, 2019): This seems to be related to the Windows line ending. It doesn't happen to me if it is set to Unix <LF>. Empty lines are inserted if the source uses <CR+LF>
Author
Owner

@DHowett-MSFT commented on GitHub (Jun 24, 2019):

Looks like a dupe of #1091

@DHowett-MSFT commented on GitHub (Jun 24, 2019): Looks like a dupe of #1091
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1957