未验证 提交 a31b0617 编写于 作者: M Megan Rogge 提交者: GitHub

expose altClickMovesCursor as setting (#114429)

* fix #101136

* Update src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts
Co-authored-by: NDaniel Imms <daimms@microsoft.com>
Co-authored-by: NDaniel Imms <daimms@microsoft.com>
上级 b2575665
......@@ -396,6 +396,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
const editorOptions = this._configurationService.getValue<IEditorOptions>('editor');
const xterm = new Terminal({
altClickMovesCursor: config.altClickMovesCursor,
scrollback: config.scrollback,
theme: this._getXtermTheme(),
drawBoldTextInBrightColors: config.drawBoldTextInBrightColors,
......@@ -1286,6 +1287,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
public updateConfig(): void {
const config = this._configHelper.config;
this._safeSetOption('altClickMovesCursor', config.altClickMovesCursor);
this._setCursorBlink(config.cursorBlinking);
this._setCursorStyle(config.cursorStyle);
this._setCursorWidth(config.cursorWidth);
......
......@@ -91,6 +91,7 @@ export interface ITerminalConfiguration {
osx: string[];
windows: string[];
};
altClickMovesCursor: boolean;
macOptionIsMeta: boolean;
macOptionClickForcesSelection: boolean;
rendererType: 'auto' | 'canvas' | 'dom' | 'experimentalWebgl';
......
......@@ -90,6 +90,11 @@ export const terminalConfiguration: IConfigurationNode = {
type: 'boolean',
default: false
},
'terminal.integrated.altClickMovesCursor': {
description: localize('terminal.integrated.altClickMovesCursor', "If enabled, alt/option + click will move the prompt cursor to position underneath the mouse. This may not work reliably depending on your shell."),
type: 'boolean',
default: true
},
'terminal.integrated.copyOnSelection': {
description: localize('terminal.integrated.copyOnSelection', "Controls whether text selected in the terminal will be copied to the clipboard."),
type: 'boolean',
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册