Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
cc51097a
V
Vscode
项目概览
徽霖
/
Vscode
通知
9
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
Vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
cc51097a
编写于
5月 31, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename multicursorModifier to multiCursorModifier (#27680)
上级
ef85e633
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
31 addition
and
31 deletion
+31
-31
src/vs/editor/browser/view/viewController.ts
src/vs/editor/browser/view/viewController.ts
+2
-2
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+2
-2
src/vs/editor/common/config/editorOptions.ts
src/vs/editor/common/config/editorOptions.ts
+16
-16
src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts
...ditor/contrib/goToDeclaration/browser/clickLinkGesture.ts
+5
-5
src/vs/editor/contrib/links/browser/links.ts
src/vs/editor/contrib/links/browser/links.ts
+3
-3
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+3
-3
未找到文件。
src/vs/editor/browser/view/viewController.ts
浏览文件 @
cc51097a
...
...
@@ -102,7 +102,7 @@ export class ViewController {
}
private
_hasMulticursorModifier
(
data
:
IMouseDispatchData
):
boolean
{
switch
(
this
.
configuration
.
editor
.
multi
c
ursorModifier
)
{
switch
(
this
.
configuration
.
editor
.
multi
C
ursorModifier
)
{
case
'
altKey
'
:
return
data
.
altKey
;
case
'
ctrlKey
'
:
...
...
@@ -114,7 +114,7 @@ export class ViewController {
}
private
_hasNonMulticursorModifier
(
data
:
IMouseDispatchData
):
boolean
{
switch
(
this
.
configuration
.
editor
.
multi
c
ursorModifier
)
{
switch
(
this
.
configuration
.
editor
.
multi
C
ursorModifier
)
{
case
'
altKey
'
:
return
data
.
ctrlKey
||
data
.
metaKey
;
case
'
ctrlKey
'
:
...
...
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
cc51097a
...
...
@@ -321,11 +321,11 @@ const editorConfiguration: IConfigurationNode = {
'
default
'
:
EDITOR_DEFAULTS
.
viewInfo
.
scrollbar
.
mouseWheelScrollSensitivity
,
'
description
'
:
nls
.
localize
(
'
mouseWheelScrollSensitivity
'
,
"
A multiplier to be used on the `deltaX` and `deltaY` of mouse wheel scroll events
"
)
},
'
editor.multi
c
ursorModifier
'
:
{
'
editor.multi
C
ursorModifier
'
:
{
'
type
'
:
'
string
'
,
'
enum
'
:
(
platform
.
isMacintosh
?
[
'
cmd
'
,
'
alt
'
]
:
[
'
ctrl
'
,
'
alt
'
]),
'
default
'
:
'
alt
'
,
'
description
'
:
nls
.
localize
(
'
multi
c
ursorModifier
'
,
"
The modifier to be used to add multiple cursors with the mouse.
"
)
'
description
'
:
nls
.
localize
(
'
multi
C
ursorModifier
'
,
"
The modifier to be used to add multiple cursors with the mouse.
"
)
},
'
editor.quickSuggestions
'
:
{
'
anyOf
'
:
[
...
...
src/vs/editor/common/config/editorOptions.ts
浏览文件 @
cc51097a
...
...
@@ -335,7 +335,7 @@ export interface IEditorOptions {
* The modifier to be used to add multiple cursors with the mouse.
* Defaults to 'alt'
*/
multi
c
ursorModifier
?:
'
cmd
'
|
'
ctrl
'
|
'
alt
'
;
multi
C
ursorModifier
?:
'
cmd
'
|
'
ctrl
'
|
'
alt
'
;
/**
* Enable quick suggestions (shadow suggestions)
* Defaults to true.
...
...
@@ -788,7 +788,7 @@ export interface IValidatedEditorOptions {
readonly
dragAndDrop
:
boolean
;
readonly
emptySelectionClipboard
:
boolean
;
readonly
useTabStops
:
boolean
;
readonly
multi
c
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
multi
C
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
viewInfo
:
InternalEditorViewOptions
;
readonly
contribInfo
:
EditorContribOptions
;
...
...
@@ -809,7 +809,7 @@ export class InternalEditorOptions {
* @internal
*/
readonly
accessibilitySupport
:
platform
.
AccessibilitySupport
;
readonly
multi
c
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
multi
C
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
// ---- cursor options
readonly
wordSeparators
:
string
;
...
...
@@ -836,7 +836,7 @@ export class InternalEditorOptions {
lineHeight
:
number
;
readOnly
:
boolean
;
accessibilitySupport
:
platform
.
AccessibilitySupport
;
multi
c
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
multi
C
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
wordSeparators
:
string
;
autoClosingBrackets
:
boolean
;
useTabStops
:
boolean
;
...
...
@@ -855,7 +855,7 @@ export class InternalEditorOptions {
this
.
lineHeight
=
source
.
lineHeight
|
0
;
this
.
readOnly
=
source
.
readOnly
;
this
.
accessibilitySupport
=
source
.
accessibilitySupport
;
this
.
multi
cursorModifier
=
source
.
multic
ursorModifier
;
this
.
multi
CursorModifier
=
source
.
multiC
ursorModifier
;
this
.
wordSeparators
=
source
.
wordSeparators
;
this
.
autoClosingBrackets
=
source
.
autoClosingBrackets
;
this
.
useTabStops
=
source
.
useTabStops
;
...
...
@@ -880,7 +880,7 @@ export class InternalEditorOptions {
&&
this
.
lineHeight
===
other
.
lineHeight
&&
this
.
readOnly
===
other
.
readOnly
&&
this
.
accessibilitySupport
===
other
.
accessibilitySupport
&&
this
.
multi
cursorModifier
===
other
.
multic
ursorModifier
&&
this
.
multi
CursorModifier
===
other
.
multiC
ursorModifier
&&
this
.
wordSeparators
===
other
.
wordSeparators
&&
this
.
autoClosingBrackets
===
other
.
autoClosingBrackets
&&
this
.
useTabStops
===
other
.
useTabStops
...
...
@@ -906,7 +906,7 @@ export class InternalEditorOptions {
lineHeight
:
(
this
.
lineHeight
!==
newOpts
.
lineHeight
),
readOnly
:
(
this
.
readOnly
!==
newOpts
.
readOnly
),
accessibilitySupport
:
(
this
.
accessibilitySupport
!==
newOpts
.
accessibilitySupport
),
multi
cursorModifier
:
(
this
.
multicursorModifier
!==
newOpts
.
multic
ursorModifier
),
multi
CursorModifier
:
(
this
.
multiCursorModifier
!==
newOpts
.
multiC
ursorModifier
),
wordSeparators
:
(
this
.
wordSeparators
!==
newOpts
.
wordSeparators
),
autoClosingBrackets
:
(
this
.
autoClosingBrackets
!==
newOpts
.
autoClosingBrackets
),
useTabStops
:
(
this
.
useTabStops
!==
newOpts
.
useTabStops
),
...
...
@@ -1244,7 +1244,7 @@ export interface IConfigurationChangedEvent {
readonly
lineHeight
:
boolean
;
readonly
readOnly
:
boolean
;
readonly
accessibilitySupport
:
boolean
;
readonly
multi
c
ursorModifier
:
boolean
;
readonly
multi
C
ursorModifier
:
boolean
;
readonly
wordSeparators
:
boolean
;
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
...
...
@@ -1399,22 +1399,22 @@ export class EditorOptionsValidator {
const
contribInfo
=
this
.
_sanitizeContribInfo
(
opts
,
defaults
.
contribInfo
);
let
configuredMulticursorModifier
:
'
altKey
'
|
'
metaKey
'
|
'
ctrlKey
'
;
if
(
typeof
opts
.
multi
c
ursorModifier
===
'
string
'
)
{
if
(
typeof
opts
.
multi
C
ursorModifier
===
'
string
'
)
{
if
(
platform
.
isMacintosh
)
{
if
(
opts
.
multi
c
ursorModifier
===
'
cmd
'
)
{
if
(
opts
.
multi
C
ursorModifier
===
'
cmd
'
)
{
configuredMulticursorModifier
=
'
metaKey
'
;
}
else
{
configuredMulticursorModifier
=
'
altKey
'
;
}
}
else
{
if
(
opts
.
multi
c
ursorModifier
===
'
ctrl
'
)
{
if
(
opts
.
multi
C
ursorModifier
===
'
ctrl
'
)
{
configuredMulticursorModifier
=
'
ctrlKey
'
;
}
else
{
configuredMulticursorModifier
=
'
altKey
'
;
}
}
}
const
multi
cursorModifier
=
_stringSet
<
'
altKey
'
|
'
metaKey
'
|
'
ctrlKey
'
>
(
configuredMulticursorModifier
,
defaults
.
multic
ursorModifier
,
[
'
altKey
'
,
'
metaKey
'
,
'
ctrlKey
'
]);
const
multi
CursorModifier
=
_stringSet
<
'
altKey
'
|
'
metaKey
'
|
'
ctrlKey
'
>
(
configuredMulticursorModifier
,
defaults
.
multiC
ursorModifier
,
[
'
altKey
'
,
'
metaKey
'
,
'
ctrlKey
'
]);
return
{
inDiffEditor
:
_boolean
(
opts
.
inDiffEditor
,
defaults
.
inDiffEditor
),
...
...
@@ -1436,7 +1436,7 @@ export class EditorOptionsValidator {
dragAndDrop
:
_boolean
(
opts
.
dragAndDrop
,
defaults
.
dragAndDrop
),
emptySelectionClipboard
:
_boolean
(
opts
.
emptySelectionClipboard
,
defaults
.
emptySelectionClipboard
),
useTabStops
:
_boolean
(
opts
.
useTabStops
,
defaults
.
useTabStops
),
multi
cursorModifier
:
multic
ursorModifier
,
multi
CursorModifier
:
multiC
ursorModifier
,
viewInfo
:
viewInfo
,
contribInfo
:
contribInfo
,
};
...
...
@@ -1660,7 +1660,7 @@ export class InternalEditorOptionsFactory {
dragAndDrop
:
opts
.
dragAndDrop
,
emptySelectionClipboard
:
opts
.
emptySelectionClipboard
,
useTabStops
:
opts
.
useTabStops
,
multi
cursorModifier
:
opts
.
multic
ursorModifier
,
multi
CursorModifier
:
opts
.
multiC
ursorModifier
,
viewInfo
:
{
extraEditorClassName
:
opts
.
viewInfo
.
extraEditorClassName
,
...
...
@@ -1837,7 +1837,7 @@ export class InternalEditorOptionsFactory {
lineHeight
:
env
.
fontInfo
.
lineHeight
,
readOnly
:
opts
.
readOnly
,
accessibilitySupport
:
env
.
accessibilitySupport
,
multi
cursorModifier
:
opts
.
multic
ursorModifier
,
multi
CursorModifier
:
opts
.
multiC
ursorModifier
,
wordSeparators
:
opts
.
wordSeparators
,
autoClosingBrackets
:
opts
.
autoClosingBrackets
,
useTabStops
:
opts
.
useTabStops
,
...
...
@@ -2056,7 +2056,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
dragAndDrop
:
true
,
emptySelectionClipboard
:
true
,
useTabStops
:
true
,
multi
c
ursorModifier
:
'
altKey
'
,
multi
C
ursorModifier
:
'
altKey
'
,
viewInfo
:
{
extraEditorClassName
:
''
,
...
...
src/vs/editor/contrib/goToDeclaration/browser/clickLinkGesture.ts
浏览文件 @
cc51097a
...
...
@@ -82,8 +82,8 @@ export class ClickLinkOptions {
}
}
function
createOptions
(
multi
c
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
):
ClickLinkOptions
{
if
(
multi
c
ursorModifier
===
'
altKey
'
)
{
function
createOptions
(
multi
C
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
):
ClickLinkOptions
{
if
(
multi
C
ursorModifier
===
'
altKey
'
)
{
if
(
platform
.
isMacintosh
)
{
return
new
ClickLinkOptions
(
KeyCode
.
Meta
,
'
metaKey
'
,
KeyCode
.
Alt
,
'
altKey
'
);
}
...
...
@@ -117,14 +117,14 @@ export class ClickLinkGesture extends Disposable {
super
();
this
.
_editor
=
editor
;
this
.
_opts
=
createOptions
(
this
.
_editor
.
getConfiguration
().
multi
c
ursorModifier
);
this
.
_opts
=
createOptions
(
this
.
_editor
.
getConfiguration
().
multi
C
ursorModifier
);
this
.
lastMouseMoveEvent
=
null
;
this
.
hasTriggerKeyOnMouseDown
=
false
;
this
.
_register
(
this
.
_editor
.
onDidChangeConfiguration
((
e
)
=>
{
if
(
e
.
multi
c
ursorModifier
)
{
const
newOpts
=
createOptions
(
this
.
_editor
.
getConfiguration
().
multi
c
ursorModifier
);
if
(
e
.
multi
C
ursorModifier
)
{
const
newOpts
=
createOptions
(
this
.
_editor
.
getConfiguration
().
multi
C
ursorModifier
);
if
(
this
.
_opts
.
equals
(
newOpts
))
{
return
;
}
...
...
src/vs/editor/contrib/links/browser/links.ts
浏览文件 @
cc51097a
...
...
@@ -199,7 +199,7 @@ class LinkDetector implements editorCommon.IEditorContribution {
}
private
updateDecorations
(
links
:
Link
[]):
void
{
const
useMetaKey
=
(
this
.
editor
.
getConfiguration
().
multi
c
ursorModifier
===
'
altKey
'
);
const
useMetaKey
=
(
this
.
editor
.
getConfiguration
().
multi
C
ursorModifier
===
'
altKey
'
);
this
.
editor
.
changeDecorations
((
changeAccessor
:
editorCommon
.
IModelDecorationsChangeAccessor
)
=>
{
var
oldDecorations
:
string
[]
=
[];
let
keys
=
Object
.
keys
(
this
.
currentOccurences
);
...
...
@@ -229,7 +229,7 @@ class LinkDetector implements editorCommon.IEditorContribution {
}
private
_onEditorMouseMove
(
mouseEvent
:
ClickLinkMouseEvent
,
withKey
?:
ClickLinkKeyboardEvent
):
void
{
const
useMetaKey
=
(
this
.
editor
.
getConfiguration
().
multi
c
ursorModifier
===
'
altKey
'
);
const
useMetaKey
=
(
this
.
editor
.
getConfiguration
().
multi
C
ursorModifier
===
'
altKey
'
);
if
(
this
.
isEnabled
(
mouseEvent
,
withKey
))
{
this
.
cleanUpActiveLinkDecoration
();
// always remove previous link decoration as their can only be one
var
occurence
=
this
.
getLinkOccurence
(
mouseEvent
.
target
.
position
);
...
...
@@ -245,7 +245,7 @@ class LinkDetector implements editorCommon.IEditorContribution {
}
private
cleanUpActiveLinkDecoration
():
void
{
const
useMetaKey
=
(
this
.
editor
.
getConfiguration
().
multi
c
ursorModifier
===
'
altKey
'
);
const
useMetaKey
=
(
this
.
editor
.
getConfiguration
().
multi
C
ursorModifier
===
'
altKey
'
);
if
(
this
.
activeLinkDecorationId
)
{
var
occurence
=
this
.
currentOccurences
[
this
.
activeLinkDecorationId
];
if
(
occurence
)
{
...
...
src/vs/monaco.d.ts
浏览文件 @
cc51097a
...
...
@@ -2881,7 +2881,7 @@ declare module monaco.editor {
* The modifier to be used to add multiple cursors with the mouse.
* Defaults to 'alt'
*/
multi
c
ursorModifier
?:
'
cmd
'
|
'
ctrl
'
|
'
alt
'
;
multi
C
ursorModifier
?:
'
cmd
'
|
'
ctrl
'
|
'
alt
'
;
/**
* Enable quick suggestions (shadow suggestions)
* Defaults to true.
...
...
@@ -3263,7 +3263,7 @@ declare module monaco.editor {
readonly
editorClassName
:
string
;
readonly
lineHeight
:
number
;
readonly
readOnly
:
boolean
;
readonly
multi
c
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
multi
C
ursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
wordSeparators
:
string
;
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
...
...
@@ -3395,7 +3395,7 @@ declare module monaco.editor {
readonly
lineHeight
:
boolean
;
readonly
readOnly
:
boolean
;
readonly
accessibilitySupport
:
boolean
;
readonly
multi
c
ursorModifier
:
boolean
;
readonly
multi
C
ursorModifier
:
boolean
;
readonly
wordSeparators
:
boolean
;
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录