mirror of
https://github.com/Microsoft/vscode
synced 2024-10-05 19:02:54 +00:00
Use switch, allow Linux to paste regular clipboard too
This commit is contained in:
parent
6f989eb488
commit
dc4e8af04b
|
@ -129,12 +129,16 @@ export class TerminalEditor extends EditorPane {
|
|||
}
|
||||
|
||||
if (event.which === 2) {
|
||||
if (isLinux) {
|
||||
// Drop selection and focus terminal on Linux to enable middle button paste when click
|
||||
// occurs on the selection itself.
|
||||
terminal.focus();
|
||||
} else if (this._terminalConfigurationService.config.middleClickBehavior === 'paste') {
|
||||
terminal.paste();
|
||||
switch (this._terminalConfigurationService.config.middleClickBehavior) {
|
||||
case 'paste':
|
||||
terminal.paste();
|
||||
break;
|
||||
case 'default':
|
||||
default:
|
||||
// Drop selection and focus terminal on Linux to enable middle button paste
|
||||
// when click occurs on the selection itself.
|
||||
terminal.focus();
|
||||
break;
|
||||
}
|
||||
} else if (event.which === 3) {
|
||||
const rightClickBehavior = this._terminalConfigurationService.config.rightClickBehavior;
|
||||
|
|
|
@ -340,12 +340,16 @@ export class TerminalTabbedView extends Disposable {
|
|||
}
|
||||
|
||||
if (event.which === 2) {
|
||||
if (isLinux) {
|
||||
// Drop selection and focus terminal on Linux to enable middle button paste when click
|
||||
// occurs on the selection itself.
|
||||
terminal.focus();
|
||||
} else if (this._terminalConfigurationService.config.middleClickBehavior === 'paste') {
|
||||
terminal.paste();
|
||||
switch (this._terminalConfigurationService.config.middleClickBehavior) {
|
||||
case 'paste':
|
||||
terminal.paste();
|
||||
break;
|
||||
case 'default':
|
||||
default:
|
||||
// Drop selection and focus terminal on Linux to enable middle button paste
|
||||
// when click occurs on the selection itself.
|
||||
terminal.focus();
|
||||
break;
|
||||
}
|
||||
} else if (event.which === 3) {
|
||||
const rightClickBehavior = this._terminalConfigurationService.config.rightClickBehavior;
|
||||
|
|
Loading…
Reference in a new issue