From dea01a9f341b91e1d9c66fd7f090765bed4d1a12 Mon Sep 17 00:00:00 2001 From: hun1ahpu Date: Sun, 18 Dec 2016 23:27:18 +0100 Subject: [PATCH 1/4] Right click to copy selection and paste on Windows --- .../parts/terminal/common/terminal.ts | 16 +++++++ .../electron-browser/terminal.contribution.ts | 18 ++++++++ .../electron-browser/terminalActions.ts | 3 +- .../electron-browser/terminalConfigHelper.ts | 16 +++++++ .../electron-browser/terminalInstance.ts | 8 ++++ .../electron-browser/terminalPanel.ts | 46 +++++++++++-------- .../terminalConfigHelper.test.ts | 9 ++++ 7 files changed, 96 insertions(+), 20 deletions(-) diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 630dc94ce89..d3dfc033192 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -44,6 +44,11 @@ export interface ITerminalConfiguration { osx: string[], windows: string[] }, + rightClickAction: { + linux: string, + osx: string, + windows: string + }, cursorBlinking: boolean, fontFamily: string, fontLigatures: boolean, @@ -62,6 +67,7 @@ export interface ITerminalConfigHelper { getFont(): ITerminalFont; getFontLigaturesEnabled(): boolean; getCursorBlink(): boolean; + getRightClickAction(): string; getCommandsToSkipShell(): string[]; getScrollback(): number; getCwd(): string; @@ -146,11 +152,21 @@ export interface ITerminalInstance { */ dispose(): void; + /** + * Check if anything is selected in terminal. + */ + hasSelection(): boolean; + /** * Copies the terminal selection to the clipboard. */ copySelection(): void; + /** + * Clear current selection. + */ + clearSelection(): void; + /** * Focuses the terminal instance. * diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index ea12eca97d7..b09d3ec38a4 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -46,6 +46,12 @@ configurationRegistry.registerConfiguration({ }, 'default': [] }, + 'terminal.integrated.rightClickAction.linux': { + 'description': nls.localize('terminal.integrated.shell.rightClickAction.linux', "Defines action on right mouse click on Linux terminal."), + 'type': 'string', + enum: ['copyPaste', 'contextMenu'], + 'default': 'contextMenu' + }, 'terminal.integrated.shell.osx': { 'description': nls.localize('terminal.integrated.shell.osx', "The path of the shell that the terminal uses on OS X."), 'type': 'string', @@ -59,6 +65,12 @@ configurationRegistry.registerConfiguration({ }, 'default': [] }, + 'terminal.integrated.rightClickAction.osx': { + 'description': nls.localize('terminal.integrated.shell.rightClickAction.osx', "Defines action on right mouse click on the OS X terminal."), + 'type': 'string', + enum: ['copyPaste', 'contextMenu'], + 'default': 'contextMenu' + }, 'terminal.integrated.shell.windows': { 'description': nls.localize('terminal.integrated.shell.windows', "The path of the shell that the terminal uses on Windows. When using shells shipped with Windows (cmd, PowerShell or Bash on Ubuntu), prefer C:\\Windows\\sysnative over C:\\Windows\\System32 to use the 64-bit versions."), 'type': 'string', @@ -72,6 +84,12 @@ configurationRegistry.registerConfiguration({ }, 'default': [] }, + 'terminal.integrated.rightClickAction.windows': { + 'description': nls.localize('terminal.integrated.shell.rightClickAction.windows', "Defines action on right mouse click on the Windows terminal."), + 'type': 'string', + enum: ['copyPaste', 'contextMenu'], + 'default': 'copyPaste' + }, 'terminal.integrated.fontFamily': { 'description': nls.localize('terminal.integrated.fontFamily', "Controls the font family of the terminal, this defaults to editor.fontFamily's value."), 'type': 'string' diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index cbaacda3391..997853ecb8e 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -56,8 +56,7 @@ export class KillTerminalAction extends Action { } /** - * Copies the terminal selection. Note that since the command palette takes focus from the terminal, - * this can only be triggered via a keybinding. + * Copies the terminal selection. */ export class CopyTerminalSelectionAction extends Action { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index 7ab53353ef0..72ace833d07 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -138,6 +138,22 @@ export class TerminalConfigHelper implements ITerminalConfigHelper { return terminalConfig.cursorBlinking; } + public getRightClickAction(): string { + let config = this._configurationService.getConfiguration(); + const integrated = config && config.terminal && config.terminal.integrated; + let rightClickAction: string = ''; + + if (this._platform === Platform.Windows) { + rightClickAction = integrated.rightClickAction.windows; + } else if (this._platform === Platform.Mac) { + rightClickAction = integrated.rightClickAction.osx; + } else if (this._platform === Platform.Linux) { + rightClickAction = integrated.rightClickAction.linux; + } + + return rightClickAction; + } + public getShell(): IShell { let config = this._configurationService.getConfiguration(); let shell: IShell = { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts index 5b575955189..195de3bf044 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts @@ -195,6 +195,10 @@ export class TerminalInstance implements ITerminalInstance { this.updateConfig(); } + public hasSelection(): boolean { + return !document.getSelection().isCollapsed; + } + public copySelection(): void { if (document.activeElement.classList.contains('xterm')) { document.execCommand('copy'); @@ -203,6 +207,10 @@ export class TerminalInstance implements ITerminalInstance { } } + public clearSelection(): void { + document.getSelection().empty(); + } + public dispose(): void { this._isExiting = true; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 3be638f8530..792c5804443 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -149,25 +149,35 @@ export class TerminalPanel extends Panel { // occurs on the selection itself. this._terminalService.getActiveInstance().focus(); } else if (event.which === 3) { - // Trigger the context menu on right click - let anchor: HTMLElement | { x: number, y: number } = this._parentDomElement; - if (event instanceof MouseEvent) { - const standardEvent = new StandardMouseEvent(event); - anchor = { x: standardEvent.posx, y: standardEvent.posy }; - } - - this._contextMenuService.showContextMenu({ - getAnchor: () => anchor, - getActions: () => TPromise.as(this._getContextMenuActions()), - getActionsContext: () => this._parentDomElement, - getKeyBinding: (action) => { - const opts = this._keybindingService.lookupKeybindings(action.id); - if (opts.length > 0) { - return opts[0]; // only take the first one - } - return null; + let rightClickAction: string = this._terminalService.configHelper.getRightClickAction(); + if (rightClickAction === 'copyPaste') { + let terminal = this._terminalService.getActiveInstance(); + if (terminal.hasSelection()) { + terminal.copySelection(); + terminal.clearSelection(); + } else { + terminal.paste(); } - }); + } else if (rightClickAction === 'contextMenu') { + let anchor: HTMLElement | { x: number, y: number } = this._parentDomElement; + if (event instanceof MouseEvent) { + const standardEvent = new StandardMouseEvent(event); + anchor = { x: standardEvent.posx, y: standardEvent.posy }; + } + + this._contextMenuService.showContextMenu({ + getAnchor: () => anchor, + getActions: () => TPromise.as(this._getContextMenuActions()), + getActionsContext: () => this._parentDomElement, + getKeyBinding: (action) => { + const opts = this._keybindingService.lookupKeybindings(action.id); + if (opts.length > 0) { + return opts[0]; // only take the first one + } + return null; + } + }); + } } })); this._register(DOM.addDisposableListener(this._parentDomElement, 'click', (event) => { diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index 7a71a7777db..c116b69e55e 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -165,6 +165,9 @@ suite('Workbench - TerminalConfigHelper', () => { }, shellArgs: { linux: [] + }, + rightClickAction: { + linux: 'contextMenu' } } } @@ -181,6 +184,9 @@ suite('Workbench - TerminalConfigHelper', () => { }, shellArgs: { osx: [] + }, + rightClickAction: { + osx: 'contextMenu' } } } @@ -197,6 +203,9 @@ suite('Workbench - TerminalConfigHelper', () => { }, shellArgs: { windows: [] + }, + rightClickAction: { + windows: 'copyPaste' } } } From fc5a3b5916a11bbf3d49bb636f6c94d6dc82f1e3 Mon Sep 17 00:00:00 2001 From: hun1ahpu Date: Tue, 20 Dec 2016 22:10:27 +0100 Subject: [PATCH 2/4] Addressed comments --- .../parts/terminal/common/terminal.ts | 10 ++++---- .../electron-browser/terminal.contribution.ts | 23 ++++--------------- .../electron-browser/terminalActions.ts | 3 ++- .../electron-browser/terminalConfigHelper.ts | 15 ++---------- .../electron-browser/terminalPanel.ts | 13 ++++------- 5 files changed, 17 insertions(+), 47 deletions(-) diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index d3dfc033192..029b1986cf7 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -19,6 +19,8 @@ export const TERMINAL_DEFAULT_SHELL_LINUX = !platform.isWindows ? (process.env.S export const TERMINAL_DEFAULT_SHELL_OSX = !platform.isWindows ? (process.env.SHELL || 'sh') : 'sh'; export const TERMINAL_DEFAULT_SHELL_WINDOWS = processes.getWindowsShell(); +export const TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE = platform.isWindows; + /** A context key that is set when the integrated terminal has focus. */ export const KEYBINDING_CONTEXT_TERMINAL_FOCUS = new RawContextKey('terminalFocus', undefined); /** A context key that is set when the integrated terminal does not have focus. */ @@ -44,11 +46,7 @@ export interface ITerminalConfiguration { osx: string[], windows: string[] }, - rightClickAction: { - linux: string, - osx: string, - windows: string - }, + rightClickCopyPaste: boolean, cursorBlinking: boolean, fontFamily: string, fontLigatures: boolean, @@ -67,7 +65,7 @@ export interface ITerminalConfigHelper { getFont(): ITerminalFont; getFontLigaturesEnabled(): boolean; getCursorBlink(): boolean; - getRightClickAction(): string; + isRightClickCopyPaste(): boolean; getCommandsToSkipShell(): string[]; getScrollback(): number; getCwd(): string; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index b09d3ec38a4..a079eccf4a0 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -11,7 +11,7 @@ import * as platform from 'vs/base/common/platform'; import nls = require('vs/nls'); import { Extensions, IConfigurationRegistry } from 'vs/platform/configuration/common/configurationRegistry'; import { GlobalQuickOpenAction } from 'vs/workbench/browser/parts/quickopen/quickopen.contribution'; -import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFAULT_SHELL_WINDOWS } from 'vs/workbench/parts/terminal/common/terminal'; +import { ITerminalService, KEYBINDING_CONTEXT_TERMINAL_FOCUS, KEYBINDING_CONTEXT_TERMINAL_TEXT_SELECTED, TERMINAL_PANEL_ID, TERMINAL_DEFAULT_SHELL_LINUX, TERMINAL_DEFAULT_SHELL_OSX, TERMINAL_DEFAULT_SHELL_WINDOWS, TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE } from 'vs/workbench/parts/terminal/common/terminal'; import { IWorkbenchActionRegistry, Extensions as ActionExtensions } from 'vs/workbench/common/actionRegistry'; import { KeyCode, KeyMod } from 'vs/base/common/keyCodes'; import { KillTerminalAction, CopyTerminalSelectionAction, CreateNewTerminalAction, FocusTerminalAction, FocusNextTerminalAction, FocusPreviousTerminalAction, RunSelectedTextInTerminalAction, ScrollDownTerminalAction, ScrollDownPageTerminalAction, ScrollToBottomTerminalAction, ScrollUpTerminalAction, ScrollUpPageTerminalAction, ScrollToTopTerminalAction, TerminalPasteAction, ToggleTerminalAction, ClearTerminalAction } from 'vs/workbench/parts/terminal/electron-browser/terminalActions'; @@ -46,12 +46,6 @@ configurationRegistry.registerConfiguration({ }, 'default': [] }, - 'terminal.integrated.rightClickAction.linux': { - 'description': nls.localize('terminal.integrated.shell.rightClickAction.linux', "Defines action on right mouse click on Linux terminal."), - 'type': 'string', - enum: ['copyPaste', 'contextMenu'], - 'default': 'contextMenu' - }, 'terminal.integrated.shell.osx': { 'description': nls.localize('terminal.integrated.shell.osx', "The path of the shell that the terminal uses on OS X."), 'type': 'string', @@ -65,12 +59,6 @@ configurationRegistry.registerConfiguration({ }, 'default': [] }, - 'terminal.integrated.rightClickAction.osx': { - 'description': nls.localize('terminal.integrated.shell.rightClickAction.osx', "Defines action on right mouse click on the OS X terminal."), - 'type': 'string', - enum: ['copyPaste', 'contextMenu'], - 'default': 'contextMenu' - }, 'terminal.integrated.shell.windows': { 'description': nls.localize('terminal.integrated.shell.windows', "The path of the shell that the terminal uses on Windows. When using shells shipped with Windows (cmd, PowerShell or Bash on Ubuntu), prefer C:\\Windows\\sysnative over C:\\Windows\\System32 to use the 64-bit versions."), 'type': 'string', @@ -84,11 +72,10 @@ configurationRegistry.registerConfiguration({ }, 'default': [] }, - 'terminal.integrated.rightClickAction.windows': { - 'description': nls.localize('terminal.integrated.shell.rightClickAction.windows', "Defines action on right mouse click on the Windows terminal."), - 'type': 'string', - enum: ['copyPaste', 'contextMenu'], - 'default': 'copyPaste' + 'terminal.integrated.rightClickCopyPaste': { + 'description': nls.localize('terminal.integrated.rightClickCopyPaste', "Controls whether copy/paste happens on mouse right click in integrated terminal."), + 'type': 'boolean', + 'default': TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE }, 'terminal.integrated.fontFamily': { 'description': nls.localize('terminal.integrated.fontFamily', "Controls the font family of the terminal, this defaults to editor.fontFamily's value."), diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts index 997853ecb8e..c0949423672 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts @@ -56,7 +56,8 @@ export class KillTerminalAction extends Action { } /** - * Copies the terminal selection. + * Copies the terminal selection. Note that since the command palette takes focus from the terminal, + * this cannot be triggered through the command palette. */ export class CopyTerminalSelectionAction extends Action { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index 72ace833d07..121192cdcd6 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -138,20 +138,9 @@ export class TerminalConfigHelper implements ITerminalConfigHelper { return terminalConfig.cursorBlinking; } - public getRightClickAction(): string { + public isRightClickCopyPaste(): boolean { let config = this._configurationService.getConfiguration(); - const integrated = config && config.terminal && config.terminal.integrated; - let rightClickAction: string = ''; - - if (this._platform === Platform.Windows) { - rightClickAction = integrated.rightClickAction.windows; - } else if (this._platform === Platform.Mac) { - rightClickAction = integrated.rightClickAction.osx; - } else if (this._platform === Platform.Linux) { - rightClickAction = integrated.rightClickAction.linux; - } - - return rightClickAction; + return config.terminal.integrated.rightClickCopyPaste; } public getShell(): IShell { diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 792c5804443..355c7c11a09 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -149,8 +149,7 @@ export class TerminalPanel extends Panel { // occurs on the selection itself. this._terminalService.getActiveInstance().focus(); } else if (event.which === 3) { - let rightClickAction: string = this._terminalService.configHelper.getRightClickAction(); - if (rightClickAction === 'copyPaste') { + if (this._terminalService.configHelper.isRightClickCopyPaste()) { let terminal = this._terminalService.getActiveInstance(); if (terminal.hasSelection()) { terminal.copySelection(); @@ -158,13 +157,9 @@ export class TerminalPanel extends Panel { } else { terminal.paste(); } - } else if (rightClickAction === 'contextMenu') { - let anchor: HTMLElement | { x: number, y: number } = this._parentDomElement; - if (event instanceof MouseEvent) { - const standardEvent = new StandardMouseEvent(event); - anchor = { x: standardEvent.posx, y: standardEvent.posy }; - } - + } else { + const standardEvent = new StandardMouseEvent(event); + let anchor: { x: number, y: number } = { x: standardEvent.posx, y: standardEvent.posy }; this._contextMenuService.showContextMenu({ getAnchor: () => anchor, getActions: () => TPromise.as(this._getContextMenuActions()), From f2c65568463cfbc7ebbe34498a7a1430d3a8cc6d Mon Sep 17 00:00:00 2001 From: hun1ahpu Date: Wed, 21 Dec 2016 22:25:20 +0100 Subject: [PATCH 3/4] Addressed comments 2 --- src/vs/workbench/parts/terminal/common/terminal.ts | 2 +- .../terminal/electron-browser/terminal.contribution.ts | 2 +- .../terminal/electron-browser/terminalConfigHelper.ts | 2 +- .../parts/terminal/electron-browser/terminalPanel.ts | 2 +- .../test/electron-browser/terminalConfigHelper.test.ts | 9 --------- 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/vs/workbench/parts/terminal/common/terminal.ts b/src/vs/workbench/parts/terminal/common/terminal.ts index 029b1986cf7..cd6e72a3d9a 100644 --- a/src/vs/workbench/parts/terminal/common/terminal.ts +++ b/src/vs/workbench/parts/terminal/common/terminal.ts @@ -65,7 +65,7 @@ export interface ITerminalConfigHelper { getFont(): ITerminalFont; getFontLigaturesEnabled(): boolean; getCursorBlink(): boolean; - isRightClickCopyPaste(): boolean; + getRightClickCopyPaste(): boolean; getCommandsToSkipShell(): string[]; getScrollback(): number; getCwd(): string; diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index a079eccf4a0..6f1f85bc17e 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -73,7 +73,7 @@ configurationRegistry.registerConfiguration({ 'default': [] }, 'terminal.integrated.rightClickCopyPaste': { - 'description': nls.localize('terminal.integrated.rightClickCopyPaste', "Controls whether copy/paste happens on mouse right click in integrated terminal."), + 'description': nls.localize('terminal.integrated.rightClickCopyPaste', "When set, this will prevent the context menu from appearing on right clicking in the terminal, instead it will copy when there is a selection and paste when there is no selection."), 'type': 'boolean', 'default': TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE }, diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts index 121192cdcd6..113024a23db 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalConfigHelper.ts @@ -138,7 +138,7 @@ export class TerminalConfigHelper implements ITerminalConfigHelper { return terminalConfig.cursorBlinking; } - public isRightClickCopyPaste(): boolean { + public getRightClickCopyPaste(): boolean { let config = this._configurationService.getConfiguration(); return config.terminal.integrated.rightClickCopyPaste; } diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts index 355c7c11a09..04a0539758b 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminalPanel.ts @@ -149,7 +149,7 @@ export class TerminalPanel extends Panel { // occurs on the selection itself. this._terminalService.getActiveInstance().focus(); } else if (event.which === 3) { - if (this._terminalService.configHelper.isRightClickCopyPaste()) { + if (this._terminalService.configHelper.getRightClickCopyPaste()) { let terminal = this._terminalService.getActiveInstance(); if (terminal.hasSelection()) { terminal.copySelection(); diff --git a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts index c116b69e55e..7a71a7777db 100644 --- a/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts +++ b/src/vs/workbench/parts/terminal/test/electron-browser/terminalConfigHelper.test.ts @@ -165,9 +165,6 @@ suite('Workbench - TerminalConfigHelper', () => { }, shellArgs: { linux: [] - }, - rightClickAction: { - linux: 'contextMenu' } } } @@ -184,9 +181,6 @@ suite('Workbench - TerminalConfigHelper', () => { }, shellArgs: { osx: [] - }, - rightClickAction: { - osx: 'contextMenu' } } } @@ -203,9 +197,6 @@ suite('Workbench - TerminalConfigHelper', () => { }, shellArgs: { windows: [] - }, - rightClickAction: { - windows: 'copyPaste' } } } From ca0dd70b14a33c5e613e93b937b190729fad50ae Mon Sep 17 00:00:00 2001 From: Daniel Imms Date: Wed, 21 Dec 2016 15:18:30 -0800 Subject: [PATCH 4/4] Improve wording --- .../parts/terminal/electron-browser/terminal.contribution.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts index f0861f5bab1..f4fee11ede3 100644 --- a/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts +++ b/src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts @@ -74,7 +74,7 @@ configurationRegistry.registerConfiguration({ 'default': [] }, 'terminal.integrated.rightClickCopyPaste': { - 'description': nls.localize('terminal.integrated.rightClickCopyPaste', "When set, this will prevent the context menu from appearing on right clicking in the terminal, instead it will copy when there is a selection and paste when there is no selection."), + 'description': nls.localize('terminal.integrated.rightClickCopyPaste', "When set, this will prevent the context menu from appearing when right clicking within the terminal, instead it will copy when there is a selection and paste when there is no selection."), 'type': 'boolean', 'default': TERMINAL_DEFAULT_RIGHT_CLICK_COPY_PASTE },