-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
copy from terminal doesn't work #31902 #37290
Conversation
|
||
// We need to listen to the mouseup event up to the document since the user may release the mouse button anywhere | ||
// outside of _xterm.element. | ||
this._instanceDisposables.push(dom.addDisposableListener(document, 'mouseup', (event: KeyboardEvent) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer if this listener was only active after a mousedown and disposed of itself on mouseup, otherwise this will run on every mouse click. You can probably do this all within the mousedown listener without the need to introduce more properties to TerminalInstance
.
Also this listener will also make it very easy to implement #36271 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh you're right: that's much better.
@Tyriar I think I made the necessary changes: could you review it again? This bug is driving me crazy :) |
And I'm back! I can't actually seem to reproduce, on mac at least. Am I missing something?
|
I can reproduce it with Windows 10: maybe this is Windows only ?
Nothing is pasted. If I release the mouse inside the terminal div it works as expected. Edit: that's the version that I installed:
|
@warpdesign yeah you're right, the problem is actually with the Windows only keybinding which is why I couldn't see it |
Made a few tweaks, will merge after CI is happy |
Copy from terminal panel didn't work if the mouse was released outside of the _xterm.element: in this case, the
mouseup
event wasn't triggered.I fixed the problem by adding a boolean to track down when the
mousedown
event is triggered on _xterm.element. In this case, the selection is refreshed when the mouseup event bubbles up to the document.Fixes #31902