The copied text is not fully pasted #5323

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

Originally created by @majonga88 on GitHub (Nov 30, 2019).

Hi folks,

I experienced an issue with copy/paste feature.

Environment

Windows build number: 10.0.18363 N/A Build 18363
Windows Terminal version : 0.7.3291.0

Steps to reproduce

On WSL 1 tab (Ubuntu distro), i create a file touch test.txt in the home path, when edit the file like this : vi test.txt and i would like to copy/paste the following text :

module.exports = {
  async rewrites() {
    return [
      // Basic `path-to-regexp` usage
      // Query object shape: { id: string }
      { source: "/user/:id", destination: "/user_profile" },

      // Optional Language
      // Query object shape: { lang?: string }
      { source: "/:lang(en|es)?/about", destination: "/about" },

      // Advanced rewrite
      // Query object shape: { id: string } (in addition to dynamic route param)
      { source: "/u/:id", destination: "/user/:id" }
    ];
  }
};

Expected behavior

The beginning of the copied text should be not missing.

image

Actual behavior

The beginning of the copied text is missing.

image

Thank you guys for your help !

Originally created by @majonga88 on GitHub (Nov 30, 2019). Hi folks, I experienced an issue with copy/paste feature. # Environment Windows build number: 10.0.18363 N/A Build 18363 Windows Terminal version : 0.7.3291.0 # Steps to reproduce On WSL 1 tab (Ubuntu distro), i create a file `touch test.txt` in the home path, when edit the file like this : `vi test.txt ` and i would like to copy/paste the following text : ``` module.exports = { async rewrites() { return [ // Basic `path-to-regexp` usage // Query object shape: { id: string } { source: "/user/:id", destination: "/user_profile" }, // Optional Language // Query object shape: { lang?: string } { source: "/:lang(en|es)?/about", destination: "/about" }, // Advanced rewrite // Query object shape: { id: string } (in addition to dynamic route param) { source: "/u/:id", destination: "/user/:id" } ]; } }; ``` # Expected behavior The beginning of the copied text should be not missing. ![image](https://user-images.githubusercontent.com/46779480/69907319-952cf480-13d3-11ea-87ff-440e993a90f6.png) # Actual behavior The beginning of the copied text is missing. ![image](https://user-images.githubusercontent.com/46779480/69907314-66af1980-13d3-11ea-8134-742f77cffd4d.png) Thank you guys for your help !
claunia added the Resolution-Duplicate label 2026-01-31 00:10:31 +00:00
Author
Owner

@DHowett-MSFT commented on GitHub (Nov 30, 2019):

Since you're using vi, and you are pasting code directly, it looks like m o d u l e . e x p o are being interpreted as vi normal-mode commands. You're issuing the following commands:

  • mo - set mark o
  • du - delete, something
  • l - move right
  • e - move to end of word
  • . - repeat last editing action
  • e - as above
  • x - delete one character (probably the . you just added)
  • p - paste whatever's in your yank buffer (probably labels:) from the first line
  • o - insert a new line below the current line, enter insert mode

Once you're in insert mode, the rest of your paste goes in unharmed.

  1. This is 100% expected behavior for pasting raw text into vim. Press i before pasting to paste code.
  2. Vi/vim support automatic detection of pastes, but requesting that makes this a /dupe of #395.
@DHowett-MSFT commented on GitHub (Nov 30, 2019): Since you're using vi, and you are pasting code directly, it looks like `m` `o` `d` `u` `l` `e` `.` `e` `x` `p` `o` are being interpreted as vi normal-mode commands. You're issuing the following commands: * `mo` - set mark `o` * `du` - delete, something * `l` - move right * `e` - move to end of word * `.` - repeat last editing action * `e` - as above * `x` - delete one character (probably the `.` you just added) * `p` - paste whatever's in your yank buffer (probably `labels:`) from the first line * `o` - insert a new line below the current line, enter insert mode Once you're in insert mode, the rest of your paste goes in unharmed. 1. This is 100% expected behavior for pasting raw text into vim. Press `i` before pasting to paste code. 2. Vi/vim support automatic detection of pastes, but requesting that makes this a /dupe of #395.
Author
Owner

@ghost commented on GitHub (Nov 30, 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 (Nov 30, 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

@ghost commented on GitHub (Nov 30, 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 (Nov 30, 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

@majonga88 commented on GitHub (Dec 1, 2019):

@DHowett-MSFT Thanks for the answer ! 🍻

@majonga88 commented on GitHub (Dec 1, 2019): @DHowett-MSFT Thanks for the answer ! 🍻
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5323