Vscode: Pasting doesn't remove selection

Created on 17 Oct 2019  路  8Comments  路  Source: microsoft/vscode


  • VSCode Version: 1.39.2
  • OS Version: Windows_NT x64 10.0.15063

Steps to Reproduce:

  1. Highlight text (click and drag)
  2. Copy text (Ctrl + C)
  3. Paste text (Ctrl + V)
  4. Note text selection has not changed (previous the cursor would move to the end of the pasted text and the text selection/highlight would be removed)


Does this issue occur when all extensions are disabled?: Yes

I have a common pattern where I like to duplicate a couple of lines. To do this I highlight the text, copy, paste and paste again. Now, pasting does not remove the text selection, so the second paste overwrites the first paste, leaving me exactly where I started.

What is the value of this functionality change?

If this is an intentional change, is there another flow to do what I am trying to accomplish?

needs more info

Most helpful comment

Good call @dk88711 once I disabled the Language Support for Java(TM) by Red Hat my copy+paste functionality went back to normal. I suppose this issue should be taken up with the dev team of that plugin. Thanks for the tip!

All 8 comments

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

So bad this non practical use and non common sense "beheavier" is turned on as default and there is no settings for that.

And it didn't even do the "Keep the text selected after pasting it (#59881)" job at all, as pasting while not selecting anything afterwards no text is keeped to be selected.

The way to work around might be Ctrl+Shift+V. One more key is needed to press now, great.

Sorry I can't repro this. So after you have pasted, then the pasted text is selected? Maybe a screenshot or video would help.

It seems to be somehow associated with the workspace. When I close my workspace and open a new window with no open workspace everything works as expected, however when I use my workspace the copy+paste behavior is as described.
Video:
https://drive.google.com/open?id=1qnl6Q_xCDThcs7zZLobFozj36IwvJE3Y

Also FWIW I first saw this in 1.39.1 and also after updating to 1.39.2, in Windows 10

I think this is a bug happened when the option java.actionsOnPaste.organizeImports is true. The option also affect multi cursor pasting.

I see. So this doesn't happen if you start vscode with --disable-extensions right?

Good call @dk88711 once I disabled the Language Support for Java(TM) by Red Hat my copy+paste functionality went back to normal. I suppose this issue should be taken up with the dev team of that plugin. Thanks for the tip!

As per @zcoffin86

Closing

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mrkiley picture mrkiley  路  3Comments

villiv picture villiv  路  3Comments

borekb picture borekb  路  3Comments

chrisdias picture chrisdias  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments