Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
bf6952b9
V
vscode
项目概览
xxadev
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vscode
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
bf6952b9
编写于
6月 13, 2017
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Rename `editor.urlClickable` to `editor.links`
上级
a1c051a4
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
22 addition
and
29 deletion
+22
-29
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+3
-3
src/vs/editor/common/config/editorOptions.ts
src/vs/editor/common/config/editorOptions.ts
+12
-18
src/vs/editor/contrib/links/browser/links.ts
src/vs/editor/contrib/links/browser/links.ts
+1
-1
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+6
-7
未找到文件。
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
bf6952b9
...
...
@@ -562,10 +562,10 @@ const editorConfiguration: IConfigurationNode = {
'
default
'
:
EDITOR_DEFAULTS
.
accessibilitySupport
,
'
description
'
:
nls
.
localize
(
'
accessibilitySupport
'
,
"
Controls whether the editor should run in a mode where it is optimized for screen readers.
"
)
},
'
editor.
urlClickable
'
:
{
'
editor.
links
'
:
{
'
type
'
:
'
boolean
'
,
'
default
'
:
EDITOR_DEFAULTS
.
urlClickable
,
'
description
'
:
nls
.
localize
(
'
urlClickable
'
,
"
Controls whether the editor should underline any URL and make them clickable through CTRL-Left Click
"
)
'
default
'
:
EDITOR_DEFAULTS
.
contribInfo
.
links
,
'
description
'
:
nls
.
localize
(
'
links
'
,
"
Controls whether the editor should detect links and make them clickable
"
)
},
'
diffEditor.renderSideBySide
'
:
{
'
type
'
:
'
boolean
'
,
...
...
src/vs/editor/common/config/editorOptions.ts
浏览文件 @
bf6952b9
...
...
@@ -321,6 +321,11 @@ export interface IEditorOptions {
* Defaults to true.
*/
hover
?:
boolean
;
/**
* Enable detecting links and making them clickable.
* Defaults to true.
*/
links
?:
boolean
;
/**
* Enable custom contextmenu.
* Defaults to true.
...
...
@@ -341,11 +346,6 @@ export interface IEditorOptions {
* Defaults to 'auto'. It is best to leave this to 'auto'.
*/
accessibilitySupport
?:
'
auto
'
|
'
off
'
|
'
on
'
;
/**
* Enable underlining URL and make it as a clickable link through CTRL-click
* Defaults to true.
*/
urlClickable
?:
boolean
;
/**
* Enable quick suggestions (shadow suggestions)
* Defaults to true.
...
...
@@ -750,6 +750,7 @@ export interface InternalEditorViewOptions {
export
interface
EditorContribOptions
{
readonly
selectionClipboard
:
boolean
;
readonly
hover
:
boolean
;
readonly
links
:
boolean
;
readonly
contextmenu
:
boolean
;
readonly
quickSuggestions
:
boolean
|
{
other
:
boolean
,
comments
:
boolean
,
strings
:
boolean
};
readonly
quickSuggestionsDelay
:
number
;
...
...
@@ -800,7 +801,6 @@ export interface IValidatedEditorOptions {
readonly
useTabStops
:
boolean
;
readonly
multiCursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
accessibilitySupport
:
'
auto
'
|
'
off
'
|
'
on
'
;
readonly
urlClickable
:
boolean
;
readonly
viewInfo
:
InternalEditorViewOptions
;
readonly
contribInfo
:
EditorContribOptions
;
...
...
@@ -822,7 +822,6 @@ export class InternalEditorOptions {
*/
readonly
accessibilitySupport
:
platform
.
AccessibilitySupport
;
readonly
multiCursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
urlClickable
:
boolean
;
// ---- cursor options
readonly
wordSeparators
:
string
;
...
...
@@ -861,7 +860,6 @@ export class InternalEditorOptions {
viewInfo
:
InternalEditorViewOptions
;
wrappingInfo
:
EditorWrappingInfo
;
contribInfo
:
EditorContribOptions
;
urlClickable
:
boolean
;
})
{
this
.
canUseTranslate3d
=
source
.
canUseTranslate3d
;
this
.
pixelRatio
=
source
.
pixelRatio
;
...
...
@@ -881,7 +879,6 @@ export class InternalEditorOptions {
this
.
viewInfo
=
source
.
viewInfo
;
this
.
wrappingInfo
=
source
.
wrappingInfo
;
this
.
contribInfo
=
source
.
contribInfo
;
this
.
urlClickable
=
source
.
urlClickable
;
}
/**
...
...
@@ -902,7 +899,6 @@ export class InternalEditorOptions {
&&
this
.
tabFocusMode
===
other
.
tabFocusMode
&&
this
.
dragAndDrop
===
other
.
dragAndDrop
&&
this
.
emptySelectionClipboard
===
other
.
emptySelectionClipboard
&&
this
.
urlClickable
===
other
.
urlClickable
&&
InternalEditorOptions
.
_equalsLayoutInfo
(
this
.
layoutInfo
,
other
.
layoutInfo
)
&&
this
.
fontInfo
.
equals
(
other
.
fontInfo
)
&&
InternalEditorOptions
.
_equalsViewOptions
(
this
.
viewInfo
,
other
.
viewInfo
)
...
...
@@ -933,8 +929,7 @@ export class InternalEditorOptions {
fontInfo
:
(
!
this
.
fontInfo
.
equals
(
newOpts
.
fontInfo
)),
viewInfo
:
(
!
InternalEditorOptions
.
_equalsViewOptions
(
this
.
viewInfo
,
newOpts
.
viewInfo
)),
wrappingInfo
:
(
!
InternalEditorOptions
.
_equalsWrappingInfo
(
this
.
wrappingInfo
,
newOpts
.
wrappingInfo
)),
contribInfo
:
(
!
InternalEditorOptions
.
_equalsContribOptions
(
this
.
contribInfo
,
newOpts
.
contribInfo
)),
urlClickable
:
(
this
.
urlClickable
!==
newOpts
.
urlClickable
),
contribInfo
:
(
!
InternalEditorOptions
.
_equalsContribOptions
(
this
.
contribInfo
,
newOpts
.
contribInfo
))
};
}
...
...
@@ -1091,6 +1086,7 @@ export class InternalEditorOptions {
return
(
a
.
selectionClipboard
===
b
.
selectionClipboard
&&
a
.
hover
===
b
.
hover
&&
a
.
links
===
b
.
links
&&
a
.
contextmenu
===
b
.
contextmenu
&&
InternalEditorOptions
.
_equalsQuickSuggestions
(
a
.
quickSuggestions
,
b
.
quickSuggestions
)
&&
a
.
quickSuggestionsDelay
===
b
.
quickSuggestionsDelay
...
...
@@ -1273,7 +1269,6 @@ export interface IConfigurationChangedEvent {
readonly
viewInfo
:
boolean
;
readonly
wrappingInfo
:
boolean
;
readonly
contribInfo
:
boolean
;
readonly
urlClickable
:
boolean
;
}
/**
...
...
@@ -1448,7 +1443,6 @@ export class EditorOptionsValidator {
useTabStops
:
_boolean
(
opts
.
useTabStops
,
defaults
.
useTabStops
),
multiCursorModifier
:
multiCursorModifier
,
accessibilitySupport
:
_stringSet
<
'
auto
'
|
'
on
'
|
'
off
'
>
(
opts
.
accessibilitySupport
,
defaults
.
accessibilitySupport
,
[
'
auto
'
,
'
on
'
,
'
off
'
]),
urlClickable
:
_boolean
(
opts
.
urlClickable
,
defaults
.
urlClickable
),
viewInfo
:
viewInfo
,
contribInfo
:
contribInfo
,
};
...
...
@@ -1617,6 +1611,7 @@ export class EditorOptionsValidator {
return
{
selectionClipboard
:
_boolean
(
opts
.
selectionClipboard
,
defaults
.
selectionClipboard
),
hover
:
_boolean
(
opts
.
hover
,
defaults
.
hover
),
links
:
_boolean
(
opts
.
links
,
defaults
.
links
),
contextmenu
:
_boolean
(
opts
.
contextmenu
,
defaults
.
contextmenu
),
quickSuggestions
:
quickSuggestions
,
quickSuggestionsDelay
:
_clampedInt
(
opts
.
quickSuggestionsDelay
,
defaults
.
quickSuggestionsDelay
,
Constants
.
MIN_SAFE_SMALL_INTEGER
,
Constants
.
MAX_SAFE_SMALL_INTEGER
),
...
...
@@ -1672,7 +1667,6 @@ export class InternalEditorOptionsFactory {
useTabStops
:
opts
.
useTabStops
,
multiCursorModifier
:
opts
.
multiCursorModifier
,
accessibilitySupport
:
opts
.
accessibilitySupport
,
urlClickable
:
opts
.
urlClickable
,
viewInfo
:
{
extraEditorClassName
:
opts
.
viewInfo
.
extraEditorClassName
,
...
...
@@ -1711,6 +1705,7 @@ export class InternalEditorOptionsFactory {
contribInfo
:
{
selectionClipboard
:
opts
.
contribInfo
.
selectionClipboard
,
hover
:
opts
.
contribInfo
.
hover
,
links
:
(
accessibilityIsOn
?
false
:
opts
.
contribInfo
.
links
),
// DISABLED WHEN SCREEN READER IS ATTACHED
contextmenu
:
opts
.
contribInfo
.
contextmenu
,
quickSuggestions
:
opts
.
contribInfo
.
quickSuggestions
,
quickSuggestionsDelay
:
opts
.
contribInfo
.
quickSuggestionsDelay
,
...
...
@@ -1880,8 +1875,7 @@ export class InternalEditorOptionsFactory {
fontInfo
:
env
.
fontInfo
,
viewInfo
:
opts
.
viewInfo
,
wrappingInfo
:
wrappingInfo
,
contribInfo
:
opts
.
contribInfo
,
urlClickable
:
opts
.
urlClickable
contribInfo
:
opts
.
contribInfo
});
}
}
...
...
@@ -2091,7 +2085,6 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
useTabStops
:
true
,
multiCursorModifier
:
'
altKey
'
,
accessibilitySupport
:
'
auto
'
,
urlClickable
:
true
,
viewInfo
:
{
extraEditorClassName
:
''
,
...
...
@@ -2143,6 +2136,7 @@ export const EDITOR_DEFAULTS: IValidatedEditorOptions = {
contribInfo
:
{
selectionClipboard
:
true
,
hover
:
true
,
links
:
true
,
contextmenu
:
true
,
quickSuggestions
:
{
other
:
true
,
comments
:
false
,
strings
:
false
},
quickSuggestionsDelay
:
10
,
...
...
src/vs/editor/contrib/links/browser/links.ts
浏览文件 @
bf6952b9
...
...
@@ -184,7 +184,7 @@ class LinkDetector implements editorCommon.IEditorContribution {
}
private
beginCompute
():
void
{
if
(
!
this
.
editor
.
getModel
()
||
!
this
.
editor
.
getConfiguration
().
urlClickable
)
{
if
(
!
this
.
editor
.
getModel
()
||
!
this
.
editor
.
getConfiguration
().
contribInfo
.
links
)
{
return
;
}
...
...
src/vs/monaco.d.ts
浏览文件 @
bf6952b9
...
...
@@ -2867,6 +2867,11 @@ declare module monaco.editor {
* Defaults to true.
*/
hover
?:
boolean
;
/**
* Enable detecting links and making them clickable.
* Defaults to true.
*/
links
?:
boolean
;
/**
* Enable custom contextmenu.
* Defaults to true.
...
...
@@ -2887,11 +2892,6 @@ declare module monaco.editor {
* Defaults to 'auto'. It is best to leave this to 'auto'.
*/
accessibilitySupport
?:
'
auto
'
|
'
off
'
|
'
on
'
;
/**
* Enable underlining URL and make it as a clickable link through CTRL-click
* Defaults to true.
*/
urlClickable
?:
boolean
;
/**
* Enable quick suggestions (shadow suggestions)
* Defaults to true.
...
...
@@ -3236,6 +3236,7 @@ declare module monaco.editor {
export
interface
EditorContribOptions
{
readonly
selectionClipboard
:
boolean
;
readonly
hover
:
boolean
;
readonly
links
:
boolean
;
readonly
contextmenu
:
boolean
;
readonly
quickSuggestions
:
boolean
|
{
other
:
boolean
;
...
...
@@ -3274,7 +3275,6 @@ declare module monaco.editor {
readonly
lineHeight
:
number
;
readonly
readOnly
:
boolean
;
readonly
multiCursorModifier
:
'
altKey
'
|
'
ctrlKey
'
|
'
metaKey
'
;
readonly
urlClickable
:
boolean
;
readonly
wordSeparators
:
string
;
readonly
autoClosingBrackets
:
boolean
;
readonly
useTabStops
:
boolean
;
...
...
@@ -3418,7 +3418,6 @@ declare module monaco.editor {
readonly
viewInfo
:
boolean
;
readonly
wrappingInfo
:
boolean
;
readonly
contribInfo
:
boolean
;
readonly
urlClickable
:
boolean
;
}
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录