提交 b8356584 编写于 作者: A Alex Dima

Fixes #27680: multiCursorModifer can be `ctrlCmd` or `alt`

上级 cc51097a
......@@ -323,9 +323,13 @@ const editorConfiguration: IConfigurationNode = {
},
'editor.multiCursorModifier': {
'type': 'string',
'enum': (platform.isMacintosh ? ['cmd', 'alt'] : ['ctrl', 'alt']),
'enum': ['ctrlCmd', 'alt'],
'enumDescriptions': [
nls.localize('multiCursorModifier.ctrlCmd', "Maps to `Control` on Windows and Linux and to `Command` on OSX."),
nls.localize('multiCursorModifier.alt', "Maps to `Alt` on Windows and Linux and to `Option` on OSX.")
],
'default': 'alt',
'description': nls.localize('multiCursorModifier', "The modifier to be used to add multiple cursors with the mouse.")
'description': nls.localize('multiCursorModifier', "The modifier to be used to add multiple cursors with the mouse. `ctrlCmd` maps to `Control` on Windows and Linux and to `Command` on OSX")
},
'editor.quickSuggestions': {
'anyOf': [
......
......@@ -335,7 +335,7 @@ export interface IEditorOptions {
* The modifier to be used to add multiple cursors with the mouse.
* Defaults to 'alt'
*/
multiCursorModifier?: 'cmd' | 'ctrl' | 'alt';
multiCursorModifier?: 'ctrlCmd' | 'alt';
/**
* Enable quick suggestions (shadow suggestions)
* Defaults to true.
......@@ -1400,18 +1400,10 @@ export class EditorOptionsValidator {
let configuredMulticursorModifier: 'altKey' | 'metaKey' | 'ctrlKey';
if (typeof opts.multiCursorModifier === 'string') {
if (platform.isMacintosh) {
if (opts.multiCursorModifier === 'cmd') {
configuredMulticursorModifier = 'metaKey';
} else {
configuredMulticursorModifier = 'altKey';
}
if (opts.multiCursorModifier === 'ctrlCmd') {
configuredMulticursorModifier = platform.isMacintosh ? 'metaKey' : 'ctrlKey';
} else {
if (opts.multiCursorModifier === 'ctrl') {
configuredMulticursorModifier = 'ctrlKey';
} else {
configuredMulticursorModifier = 'altKey';
}
configuredMulticursorModifier = 'altKey';
}
}
const multiCursorModifier = _stringSet<'altKey' | 'metaKey' | 'ctrlKey'>(configuredMulticursorModifier, defaults.multiCursorModifier, ['altKey', 'metaKey', 'ctrlKey']);
......
......@@ -2881,7 +2881,7 @@ declare module monaco.editor {
* The modifier to be used to add multiple cursors with the mouse.
* Defaults to 'alt'
*/
multiCursorModifier?: 'cmd' | 'ctrl' | 'alt';
multiCursorModifier?: 'ctrlCmd' | 'alt';
/**
* Enable quick suggestions (shadow suggestions)
* Defaults to true.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册