Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
68902f7e
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,发现更多精彩内容 >>
提交
68902f7e
编写于
5月 22, 2017
作者:
M
Martin Aeschlimann
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Editor doesn't render any problem markers anymore. Fixes #27076
上级
87b95c2d
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
43 deletion
+22
-43
src/vs/editor/browser/widget/codeEditorWidget.ts
src/vs/editor/browser/widget/codeEditorWidget.ts
+22
-41
src/vs/editor/browser/widget/media/green-squiggly.svg
src/vs/editor/browser/widget/media/green-squiggly.svg
+0
-1
src/vs/editor/browser/widget/media/red-squiggly.svg
src/vs/editor/browser/widget/media/red-squiggly.svg
+0
-1
未找到文件。
src/vs/editor/browser/widget/codeEditorWidget.ts
浏览文件 @
68902f7e
...
...
@@ -30,10 +30,9 @@ import { IEditorOptions } from 'vs/editor/common/config/editorOptions';
import
{
IPosition
}
from
'
vs/editor/common/core/position
'
;
import
{
IEditorWhitespace
}
from
'
vs/editor/common/viewLayout/whitespaceComputer
'
;
import
{
CoreEditorCommand
}
from
'
vs/editor/common/controller/coreCommands
'
;
import
{
isChrome
}
from
"
vs/base/browser/browser
"
;
import
URI
from
"
vs/base/common/uri
"
;
import
{
IThemeService
,
registerThemingParticipant
}
from
'
vs/platform/theme/common/themeService
'
;
import
{
editorErrorForeground
,
editorErrorBorder
,
editorWarningForeground
,
editorWarningBorder
}
from
"
vs/editor/common/view/editorColorRegistry
"
;
import
{
editorErrorForeground
,
editorErrorBorder
,
editorWarningForeground
,
editorWarningBorder
}
from
'
vs/editor/common/view/editorColorRegistry
'
;
import
{
Color
}
from
'
vs/base/common/color
'
;
export
abstract
class
CodeEditorWidget
extends
CommonCodeEditor
implements
editorBrowser
.
ICodeEditor
{
...
...
@@ -548,47 +547,29 @@ class CodeEditorWidgetFocusTracker extends Disposable {
}
}
const
errorIconPath
=
URI
.
parse
(
require
.
toUrl
(
'
vs/editor/browser/widget/media/red-squiggly.svg
'
)).
fsPath
;
const
warningIconPath
=
URI
.
parse
(
require
.
toUrl
(
'
vs/editor/browser/widget/media/green-squiggly.svg
'
)).
fsPath
;
registerThemingParticipant
((
theme
,
collector
)
=>
{
// webkit-mask only supported in chrome
if
(
isChrome
)
{
let
errorForeground
=
theme
.
getColor
(
editorErrorForeground
);
if
(
errorForeground
)
{
collector
.
addRule
(
`.monaco-editor .redsquiggly { background-color:
${
errorForeground
}
; -webkit-mask: url("
${
errorIconPath
}
") repeat-x bottom left; }`
);
}
const
squigglyStart
=
encodeURIComponent
(
`<svg xmlns='http://www.w3.org/2000/svg' height='3' width='6'><g fill='`
);
const
squigglyEnd
=
encodeURIComponent
(
`'><polygon points='5.5,0 2.5,3 1.1,3 4.1,0'/><polygon points='4,0 6,2 6,0.6 5.4,0'/><polygon points='0,2 1,3 2.4,3 0,0.6'/></g></svg>`
);
let
errorBorderColor
=
theme
.
getColor
(
editorErrorBorder
);
if
(
errorBorderColor
)
{
collector
.
addRule
(
`.monaco-editor .redsquiggly { border-bottom: 4px double
${
errorBorderColor
}
; -webkit-mask: none; background: none; }`
);
}
let
warningForeground
=
theme
.
getColor
(
editorWarningForeground
);
if
(
warningForeground
)
{
collector
.
addRule
(
`.monaco-editor .greensquiggly { background-color:
${
warningForeground
}
; -webkit-mask: url("
${
warningIconPath
}
") repeat-x bottom left; }`
);
}
function
getSquigglySVGData
(
color
:
Color
)
{
return
squigglyStart
+
encodeURIComponent
(
color
.
toString
())
+
squigglyEnd
;
}
let
warningBorderColor
=
theme
.
getColor
(
editorWarningBorder
);
if
(
warningBorderColor
)
{
collector
.
addRule
(
`.monaco-editor .greensquiggly { border-bottom: 4px double
${
warningBorderColor
}
; -webkit-mask: none; background: none; }`
);
}
registerThemingParticipant
((
theme
,
collector
)
=>
{
let
errorBorderColor
=
theme
.
getColor
(
editorErrorBorder
);
if
(
errorBorderColor
)
{
collector
.
addRule
(
`.monaco-editor .redsquiggly { border-bottom: 4px double
${
errorBorderColor
}
; }`
);
}
let
errorForeground
=
theme
.
getColor
(
editorErrorForeground
);
if
(
errorForeground
)
{
collector
.
addRule
(
`.monaco-editor .redsquiggly { background: url("data:image/svg+xml,
${
getSquigglySVGData
(
errorForeground
)}
") repeat-x bottom left; }`
);
}
// Any other browser
else
{
let
errorBorderColor
=
theme
.
getColor
(
editorErrorBorder
);
if
(
errorBorderColor
)
{
collector
.
addRule
(
`.monaco-editor .redsquiggly { border-bottom: 4px double
${
errorBorderColor
}
; }`
);
}
else
{
collector
.
addRule
(
`.monaco-editor .redsquiggly { background: url("
${
errorIconPath
}
") repeat-x bottom left; }`
);
}
let
warningBorderColor
=
theme
.
getColor
(
editorWarningBorder
);
if
(
warningBorderColor
)
{
collector
.
addRule
(
`.monaco-editor .greensquiggly { border-bottom: 4px double
${
warningBorderColor
}
; }`
);
}
else
{
collector
.
addRule
(
`.monaco-editor .greensquiggly { background: url("
${
warningIconPath
}
") repeat-x bottom left; }`
);
}
let
warningBorderColor
=
theme
.
getColor
(
editorWarningBorder
);
if
(
warningBorderColor
)
{
collector
.
addRule
(
`.monaco-editor .greensquiggly { border-bottom: 4px double
${
warningBorderColor
}
; }`
);
}
let
warningForeground
=
theme
.
getColor
(
editorWarningForeground
);
if
(
warningForeground
)
{
collector
.
addRule
(
`.monaco-editor .greensquiggly { background: url("data:image/svg+xml;utf8,
${
getSquigglySVGData
(
warningForeground
)}
") repeat-x bottom left; }`
);
}
});
\ No newline at end of file
src/vs/editor/browser/widget/media/green-squiggly.svg
已删除
100644 → 0
浏览文件 @
87b95c2d
<svg
xmlns=
"http://www.w3.org/2000/svg"
height=
"3"
width=
"6"
><g
fill=
"#080"
><polygon
points=
"5.5,0 2.5,3 1.1,3 4.1,0"
/><polygon
points=
"4,0 6,2 6,0.6 5.4,0"
/><polygon
points=
"0,2 1,3 2.4,3 0,0.6"
/></g></svg>
\ No newline at end of file
src/vs/editor/browser/widget/media/red-squiggly.svg
已删除
100644 → 0
浏览文件 @
87b95c2d
<svg
xmlns=
"http://www.w3.org/2000/svg"
viewBox=
"0 0 6 3"
enable-background=
"new 0 0 6 3"
height=
"3"
width=
"6"
><g
fill=
"#F00"
><polygon
points=
"5.5,0 2.5,3 1.1,3 4.1,0"
/><polygon
points=
"4,0 6,2 6,0.6 5.4,0"
/><polygon
points=
"0,2 1,3 2.4,3 0,0.6"
/></g></svg>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录