提交 bd36bf5d 编写于 作者: D Daniel Imms

Add terminal wordSeparators setting

Fixes #93261
上级 48801495
......@@ -333,6 +333,11 @@ configurationRegistry.registerConfiguration({
type: 'boolean',
default: true
},
'terminal.integrated.wordSeparators': {
description: nls.localize('terminal.integrated.wordSeparators', "A string containing all characters to be considered word separators by the double click to select word feature."),
type: 'string',
default: ' ()[]{}\',"`'
},
'terminal.integrated.experimentalUseTitleEvent': {
description: nls.localize('terminal.integrated.experimentalUseTitleEvent', "An experimental setting that will use the terminal title event for the dropdown title. This setting will only apply to new terminals."),
type: 'boolean',
......
......@@ -488,7 +488,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
fastScrollSensitivity: editorOptions.fastScrollSensitivity,
scrollSensitivity: editorOptions.mouseWheelScrollSensitivity,
rendererType: config.rendererType === 'auto' || config.rendererType === 'experimentalWebgl' ? 'canvas' : config.rendererType,
wordSeparator: ' ()[]{}\',"`'
wordSeparator: config.wordSeparators
});
this._xterm = xterm;
this._xtermCore = (xterm as any)._core as XTermCore;
......@@ -1248,6 +1248,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
this._safeSetOption('macOptionIsMeta', config.macOptionIsMeta);
this._safeSetOption('macOptionClickForcesSelection', config.macOptionClickForcesSelection);
this._safeSetOption('rightClickSelectsWord', config.rightClickBehavior === 'selectWord');
this._safeSetOption('wordSeparator', config.wordSeparators);
if (config.rendererType !== 'experimentalWebgl') {
// Never set webgl as it's an addon not a rendererType
this._safeSetOption('rendererType', config.rendererType === 'auto' ? 'canvas' : config.rendererType);
......
......@@ -120,6 +120,7 @@ export interface ITerminalConfiguration {
showExitAlert: boolean;
splitCwd: 'workspaceRoot' | 'initial' | 'inherited';
windowsEnableConpty: boolean;
wordSeparators: string;
experimentalUseTitleEvent: boolean;
enableFileLinks: boolean;
unicodeVersion: '6' | '11';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册