-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] middle-clicking to close programs on Linux pastes selection into open program #1046
Comments
This looks like the same script repeated twice rather than two different scripts being merged. Does it also happen that two different scripts get concated like this? |
Found it! Closing by middle-click has the side effect of paste-last-selection which is also done with middle click. See demo below. So, depending on what was selected, this can feel like "multiple scripts merging" even if something else is happening. For what it's worth, separate from this issue, my vote would be to disable paste-last-selection-by-middle-click altogether. I always disable in in VS Code too. It happens way too often accidentally while scrolling/moving. update-2023-04-25_19.37.34.mp4 |
Nice find. I didn't even know that was a feature. |
Where/how do you disable this in VS Code? Web searches tell me this is a Linux feature rather than a VS Code feature. |
I think you're right. I must be confusing it with some other VSCode feature I have disabled. |
FWIW, I found that other setting, and it is indeed somewhat related: I set Sometimes I accidentally press |
It looks like Although that doesn't actually seem to fix the problem. |
To avoid the Linux feature of pasting on middle click, we need to consume the mouse up event in the browser on middle click instead of mouse down. This also sets the `selectionClipboard` editor option to false which should disable the feature altogether in the monaco editor but the setting seems to be broken in the browser[1]. [1]: microsoft/vscode#181050 Fixes: pybricks/support#1046
To avoid the Linux feature of pasting on middle click, we need to consume the mouse up event in the browser on middle click instead of mouse down. This also sets the `selectionClipboard` editor option to false which should disable the feature altogether in the monaco editor but the setting seems to be broken in the browser[1]. [1]: microsoft/vscode#181050 Fixes: pybricks/support#1046
|
Describe the bug
Occasionally, the script gets in a bad state. From what I can tell, several scripts got merged.
To reproduce
Haven't found a consistent approach. If I had to guess, this happens only when closing quite a few tabs fairly quickly. (Mouse on first one, repeatedly click middle button.)
The text was updated successfully, but these errors were encountered: