Vscode: regression: "editor.selectionClipboard": false no longer respected on ubuntu

Created on 6 May 2018  ·  46Comments  ·  Source: microsoft/vscode


middle click paste now works, as opposed to previous versions.

  • VSCode Version: april release
  • OS Version: ubuntu 17.10
bug editor-contrib linux verified

Most helpful comment

+1
I'm constantly screwing up my code when scrolling through it. (hypersensitive mouse wheel syndrome)
I would really like to be able to disable it again

All 46 comments

@alexandrudima box selection may have broken this, if both can't live in harmony then middle click to paste selection should win (until we get https://github.com/Microsoft/vscode/issues/3130)

Why there is no separate setting for middle-click paste? Or it's the only thing that is supposed to be affected by this setting?

I am also experiencing this issue

+1
I'm constantly screwing up my code when scrolling through it. (hypersensitive mouse wheel syndrome)
I would really like to be able to disable it again

Is there a resolution to this? VScode is in the only application in which this happens, the proposed setting of editor.selectionClipboard to false does not fix it, and my code is also constantly breaking everywhere because of unnoticed and accidental middle-clicks. I'd greatly appreciate some relief from this!

@yli3 there's an answer from @Tyriar:

This is as designed, I'm not even sure we could disable it if we wanted to since it's an OS-level thing and we're build on the web platform.

It sounds like we're doomed to suffer :)

It worked before the April release.

reproduced with following versions:

VS code:

Version: 1.28.2
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:20:56.183Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

Ubuntu:

Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial

I too am experiencing this issue. This makes it hard to type when all my code gets pasted in every time I touch my trackpad wrong.

Manjaro:

DISTRIB_ID=ManjaroLinux
DISTRIB_RELEASE=18.0.0
DISTRIB_CODENAME=Illyria
DISTRIB_DESCRIPTION="Manjaro Linux"

Code - OSS:

Version: 1.27.2
Commit: f46c4c469d6e6d8c46f268d1553c5dc4b475840f
Date: 2018-09-14T00:41:55.375Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

I meet the same problem.
I turn off "middle paste" in the system setting and set "editor.selectionClipboard" false, but it doesn't work.

System Info:
Ubuntu 18.04
Linux 4.15.0-43-generic #46-Ubuntu SMP Thu Dec 6 14:45:28 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

VS code info:
1.30.1
dea8705087adb1b5e5ae1d9123278e178656186a
x64

Is there any ways to solve the problem?

May be it is the problem of system.
And I turn off the middle button function to solve the problem. And it works for me.
Reference: xorg - How can I turn off “middle mouse button paste” functionality in all programs?

It is not a problem of the system. As I already noted, this is a regression.

Also for me.
+1

(Alt+Shift+Left Button on drag select multiple lines without pasting clipboard content)

Middle-click paste is disabled in my system. Pastes nowhere except vscode.

"editor.selectionClipboard": false in settings

Ubuntu 18.10
Linux 4.18.0-13-generic # 14-Ubuntu SMP Wed Dec 5 09:04:24 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Version: 1.30.2
Commit: 61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
Date: 2019-01-07T22:49:48.319Z
Electron: 2.0.12
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
OS: Linux x64 4.18.0-13-generic

Same bug here. Ubuntu 18.10, visual studio code from november 2018, middle paste in gnome tweaks off; editor.selectionClipbard off. If I press ctrl+c and copy some text, then press middle button, it pastes, although it does not copy on select.

To clarify for those who think this is an xorg setting; it's not. Applications implement the protocol. That's why disabling it in gnome via gnome-tweaks does not disable it in vscode; and in chrome, for the record.r r the record.r the record.the record. ;-)

I had to use Easystroke Gesture Recognition to remap Middle click to Ctrl+click, so I can navigate to the symbol under the cursor instead of pasting. I was already using this app for other gestures anyway (like Mouse wheel left -> Ctrl + PgUp to open previous tab).

It works as intended, however it will also break middle click actions that used to work like closing a tab.

That remains a workaround, anyway. As for actually binding Middle click to something else, see https://github.com/Microsoft/vscode/issues/3130

+1 Please fix

Best workaround I have found so far:

No need to disable your precious middle mouse button bindings, no clearing of visual selections nor performance losses because of emptying the primary X clipboard periodically. With the utilization of XInput and Xlibs this has no measurable impact on performance whatsoever. No elevated privileges required. Just run within your regular users' X session.

https://github.com/milaq/XMousePasteBlock

@dtmland thanks a lot, immensely helpful.

Can we not have setting for this feature in VS Code.
This is irritating, I wrote hundreds of line and after save I get an error in browser because of this stupid behaviour.

Setting to disable the three finger tap to paste is really necessary.

Behaviour is reproducible every time. Copy manually (right click and copy something, or ctrl+c) then tap with 3 fingers.

This editor is unusable for me. I've had the clipboard spattered all over my code simply because I used the mouse wheel to scroll for the last time. It's absurd that there is no way to disable this.

I bet this issue will never be solved until 2050

@donaldcallen same problem here. It's very annoying...

This issue needs to get fixed. Several times I've wasted time having to debug my code when all that happened was an extra line got pasted in somewhere on accident.

This may help. i havent tried as i dont have the time, but it was marked as the answer in S.O. https://app.assembla.com/spaces/slipstream/wiki/Disabling_GTK's_middle_mouse_button_functionality

Originally I looked at #14610 and followed its instructions and the middle-click paste did stop for once, but after that this unwanted behavior reappeared. Then I found this... so the editor setting doesn't really work after all.

It's really necessary to disable this within the app as in some cases VS code would paste unwanted stuffs while scrolling as if the middle wheel was clicked (while in reality I did not).

EDIT: XMousePasteBlock apparently works as intended... just that I don't know where and how I should put it in the startup script so it can cover everywhere (all programs, sudo/root or not).

EDIT: XMousePasteBlock apparently works as intended... just that I don't know where and how I should put it in the startup script so it can cover everywhere (all programs, sudo/root or not).

Appending xmousepasteblock & to ~/.profile oughta do it.

  • Open terminal
  • enter gedit ~/.profile
  • paste in xmousepasteblock & and save
  • Important: Don't omit the & or your computer will hang on login.

edit: links for the curious https://www.stefaanlippens.net/bashrc_and_others/ https://unix.stackexchange.com/questions/86247/what-does-ampersand-mean-at-the-end-of-a-shell-script-line

Finally found what was causing my code to constantly break when navigating with the mouse. I'm having the same issue on my mac and it's making it very frustrating to work with - I will try the solutions proposed here but really hope it can be fixed properly.

Is there a fix for this yet?

XMousePasteBlock is the best. I made it to start with the system and I'm fine now. :)

Same here on Arch / Manjaro with XFCE

Bumping for a solution to this problem. Especially with a sensitive middle mouse button this is very annoying. Just like @ivorhoulker it took me some time to figure out what was actually causing this.

I no longer use this editor because of this.

On Wed, 10 Jul 2019 at 12:38, Dirk de Boer notifications@github.com wrote:

Bumping for a solution to this problem. Especially with a sensitive middle
mouse button this is very annoying. Just like @ivorhoulker
https://github.com/ivorhoulker it took me some time to figure out what
was actually causing this.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/vscode/issues/49305?email_source=notifications&email_token=ABGOGJ72SRD7WBIHDMOBN6LP6YF73A5CNFSM4E6QFBU2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZUBDSY#issuecomment-510136779,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABGOGJ2BRJL3XU5FM7HOXDLP6YF73ANCNFSM4E6QFBUQ
.

@donaldcallen If you don't use middle-click to paste you can disable it system-wide with XMousePasteBlock.

Additionally... it seems VSCode often mistreats mouse scrolls as middle clicks causing unwanted pastes.

While this is indeed a system-level feature, I recall that before using XMousePasteBlock, in other programs, if I really have to paste something that way I need to _explicitly_ do a middle click, and mouse scrolls hardly caused any unwanted pastes outside VSCode.

The back/forward buttons on my mouse started working on my Linux workstation today, so we're definitely making progress. Thanks!

I am having the exact same problem. Could you guys fix it soon? Thank you very much.
My OS is:
Ubuntu 18.04 LTS

Screenshot from 2019-08-06 21-10-22
The Middle Click Paste setting is respected by other apps, but not VS Code.

Please at least disable it when it is maped for the multi-selection, That realy is a dealbreaker

Yes, this problem is breaking code constantly, year and half and still going, let's see how many years takes to fix.

Is disabling middle button click the only solution for this problem currently? So sad.

Look guys, if you doesn't use middle click paste feature, you could install XMousePasteBlock, which fix this issue. You could still use middle click at all, it just disable that paste feature. I'm using it and it works perfect.

+1 for a fix

@ACheshirov
The issue for many people (or at least me and @souldomination ) is that we use middle-click paste outside of Visual Studio. But it's very easy to paste your buffer without realizing it scrolling, and not very easy to find and remove that code.

@ACheshirov
The issue for many people (or at least me and @souldomination ) is that we use middle-click paste outside of Visual Studio. But it's very easy to paste your buffer without realizing it scrolling, and not very easy to find and remove that code.

Yeah, the problem with VSCode is that things get pasted _while scrolling_ with middle mouse wheel (without having to explicitly middle-click). This is hardly expected behavior and can be hard to notice at times.

Using XMousePasteBlock disables middle-click paste feature system-wise and also fixes the VSCode issue that things get pasted while scrolling, but it's indeed not a solution for those who do use the middle-click paste feature.

@alexandrudima Thank you!

Was this page helpful?
0 / 5 - 0 ratings