Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
9b06d439
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,发现更多精彩内容 >>
提交
9b06d439
编写于
11月 18, 2016
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Merge pull request #15588 from rebornix/EnhancedDiffView"
This reverts commit
e55b563d
, reversing changes made to
66650300
.
上级
ce97d438
变更
21
隐藏空白更改
内联
并排
Showing
21 changed file
with
48 addition
and
380 deletion
+48
-380
src/vs/editor/browser/editorBrowser.ts
src/vs/editor/browser/editorBrowser.ts
+0
-4
src/vs/editor/browser/view/viewImpl.ts
src/vs/editor/browser/view/viewImpl.ts
+1
-8
src/vs/editor/browser/view/viewOverlays.ts
src/vs/editor/browser/view/viewOverlays.ts
+9
-1
src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css
src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css
+0
-1
src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts
src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts
+6
-1
src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css
...r/browser/viewParts/linesDecorations/linesDecorations.css
+0
-1
src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts
...or/browser/viewParts/linesDecorations/linesDecorations.ts
+16
-2
src/vs/editor/browser/viewParts/margin/margin.ts
src/vs/editor/browser/viewParts/margin/margin.ts
+0
-83
src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css
...browser/viewParts/marginDecorations/marginDecorations.css
+0
-15
src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts
.../browser/viewParts/marginDecorations/marginDecorations.ts
+0
-109
src/vs/editor/browser/viewParts/viewZones/viewZones.ts
src/vs/editor/browser/viewParts/viewZones/viewZones.ts
+6
-45
src/vs/editor/browser/widget/diffEditorWidget.ts
src/vs/editor/browser/widget/diffEditorWidget.ts
+7
-57
src/vs/editor/browser/widget/media/addition-inverse.svg
src/vs/editor/browser/widget/media/addition-inverse.svg
+0
-1
src/vs/editor/browser/widget/media/addition.svg
src/vs/editor/browser/widget/media/addition.svg
+0
-1
src/vs/editor/browser/widget/media/deletion-inverse.svg
src/vs/editor/browser/widget/media/deletion-inverse.svg
+0
-1
src/vs/editor/browser/widget/media/deletion.svg
src/vs/editor/browser/widget/media/deletion.svg
+0
-1
src/vs/editor/browser/widget/media/diffEditor.css
src/vs/editor/browser/widget/media/diffEditor.css
+0
-22
src/vs/editor/common/config/commonEditorConfig.ts
src/vs/editor/common/config/commonEditorConfig.ts
+1
-8
src/vs/editor/common/editorCommon.ts
src/vs/editor/common/editorCommon.ts
+1
-6
src/vs/editor/common/model/textModelWithDecorations.ts
src/vs/editor/common/model/textModelWithDecorations.ts
+0
-3
src/vs/monaco.d.ts
src/vs/monaco.d.ts
+1
-10
未找到文件。
src/vs/editor/browser/editorBrowser.ts
浏览文件 @
9b06d439
...
...
@@ -211,10 +211,6 @@ export interface IViewZone {
* The dom node of the view zone
*/
domNode
:
HTMLElement
;
/**
* An optional dom node for the view zone that will be placed in the margin area.
*/
marginDomNode
?:
HTMLElement
;
/**
* Callback which gives the relative top of the view zone as it appears (taking scrolling into account).
*/
...
...
src/vs/editor/browser/view/viewImpl.ts
浏览文件 @
9b06d439
...
...
@@ -30,9 +30,7 @@ import { GlyphMarginOverlay } from 'vs/editor/browser/viewParts/glyphMargin/glyp
import
{
LineNumbersOverlay
}
from
'
vs/editor/browser/viewParts/lineNumbers/lineNumbers
'
;
import
{
IndentGuidesOverlay
}
from
'
vs/editor/browser/viewParts/indentGuides/indentGuides
'
;
import
{
ViewLines
}
from
'
vs/editor/browser/viewParts/lines/viewLines
'
;
import
{
Margin
}
from
'
vs/editor/browser/viewParts/margin/margin
'
;
import
{
LinesDecorationsOverlay
}
from
'
vs/editor/browser/viewParts/linesDecorations/linesDecorations
'
;
import
{
MarginViewLineDecorationsOverlay
}
from
'
vs/editor/browser/viewParts/marginDecorations/marginDecorations
'
;
import
{
ViewOverlayWidgets
}
from
'
vs/editor/browser/viewParts/overlayWidgets/overlayWidgets
'
;
import
{
DecorationsOverviewRuler
}
from
'
vs/editor/browser/viewParts/overviewRuler/decorationsOverviewRuler
'
;
import
{
OverviewRuler
}
from
'
vs/editor/browser/viewParts/overviewRuler/overviewRuler
'
;
...
...
@@ -239,14 +237,9 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp
let
marginViewOverlays
=
new
MarginViewOverlays
(
this
.
_context
,
this
.
layoutProvider
);
this
.
viewParts
.
push
(
marginViewOverlays
);
marginViewOverlays
.
addDynamicOverlay
(
new
GlyphMarginOverlay
(
this
.
_context
));
marginViewOverlays
.
addDynamicOverlay
(
new
MarginViewLineDecorationsOverlay
(
this
.
_context
));
marginViewOverlays
.
addDynamicOverlay
(
new
LinesDecorationsOverlay
(
this
.
_context
));
marginViewOverlays
.
addDynamicOverlay
(
new
LineNumbersOverlay
(
this
.
_context
));
let
margin
=
new
Margin
(
this
.
_context
,
this
.
layoutProvider
);
margin
.
domNode
.
appendChild
(
this
.
viewZones
.
marginDomNode
);
margin
.
domNode
.
appendChild
(
marginViewOverlays
.
getDomNode
());
this
.
viewParts
.
push
(
margin
);
// Content widgets
this
.
contentWidgets
=
new
ViewContentWidgets
(
this
.
_context
,
this
.
domNode
);
...
...
@@ -278,7 +271,7 @@ export class View extends ViewEventHandler implements editorBrowser.IView, IDisp
this
.
linesContent
.
appendChild
(
this
.
viewLines
.
getDomNode
());
this
.
linesContent
.
appendChild
(
this
.
contentWidgets
.
domNode
);
this
.
linesContent
.
appendChild
(
this
.
viewCursors
.
getDomNode
());
this
.
overflowGuardContainer
.
appendChild
(
margin
.
domNode
);
this
.
overflowGuardContainer
.
appendChild
(
margin
ViewOverlays
.
getDomNode
()
);
this
.
overflowGuardContainer
.
appendChild
(
this
.
linesContentContainer
);
this
.
overflowGuardContainer
.
appendChild
(
scrollDecoration
.
getDomNode
());
this
.
overflowGuardContainer
.
appendChild
(
this
.
overlayWidgets
.
domNode
);
...
...
src/vs/editor/browser/view/viewOverlays.ts
浏览文件 @
9b06d439
...
...
@@ -233,7 +233,7 @@ export class MarginViewOverlays extends ViewOverlays {
this
.
_contentLeft
=
context
.
configuration
.
editor
.
layoutInfo
.
contentLeft
;
this
.
_canUseTranslate3d
=
context
.
configuration
.
editor
.
viewInfo
.
canUseTranslate3d
;
this
.
domNode
.
setClassName
(
editorBrowser
.
ClassNames
.
MARGIN_VIEW_OVERLAYS
);
this
.
domNode
.
setClassName
(
editorBrowser
.
ClassNames
.
MARGIN_VIEW_OVERLAYS
+
'
monaco-editor-background
'
);
this
.
domNode
.
setWidth
(
1
);
Configuration
.
applyFontInfo
(
this
.
domNode
,
this
.
_context
.
configuration
.
editor
.
fontInfo
);
...
...
@@ -283,6 +283,14 @@ export class MarginViewOverlays extends ViewOverlays {
_viewOverlaysRender
(
ctx
:
IRestrictedRenderingContext
):
void
{
super
.
_viewOverlaysRender
(
ctx
);
if
(
this
.
_canUseTranslate3d
)
{
let
transform
=
'
translate3d(0px,
'
+
ctx
.
linesViewportData
.
visibleRangesDeltaTop
+
'
px, 0px)
'
;
this
.
domNode
.
setTransform
(
transform
);
this
.
domNode
.
setTop
(
0
);
}
else
{
this
.
domNode
.
setTransform
(
''
);
this
.
domNode
.
setTop
(
ctx
.
linesViewportData
.
visibleRangesDeltaTop
);
}
let
height
=
Math
.
min
(
this
.
_layoutProvider
.
getTotalHeight
(),
1000000
);
this
.
domNode
.
setHeight
(
height
);
this
.
domNode
.
setWidth
(
this
.
_contentLeft
);
...
...
src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.css
浏览文件 @
9b06d439
...
...
@@ -10,7 +10,6 @@
vertical-align
:
middle
;
box-sizing
:
border-box
;
cursor
:
default
;
height
:
100%
;
}
.monaco-editor
.relative-current-line-number
{
...
...
src/vs/editor/browser/viewParts/lineNumbers/lineNumbers.ts
浏览文件 @
9b06d439
...
...
@@ -97,15 +97,20 @@ export class LineNumbersOverlay extends DynamicViewOverlay {
// --- end event handlers
public
prepareRender
(
ctx
:
IRenderingContext
):
void
{
if
(
!
this
.
shouldRender
())
{
throw
new
Error
(
'
I did not ask to render!
'
);
}
if
(
!
this
.
_renderLineNumbers
)
{
this
.
_renderResult
=
null
;
return
;
}
let
lineHeightClassName
=
(
platform
.
isLinux
?
(
this
.
_lineHeight
%
2
===
0
?
'
lh-even
'
:
'
lh-odd
'
)
:
''
);
let
lineHeight
=
this
.
_lineHeight
.
toString
();
let
visibleStartLineNumber
=
ctx
.
visibleRange
.
startLineNumber
;
let
visibleEndLineNumber
=
ctx
.
visibleRange
.
endLineNumber
;
let
common
=
'
<div class="
'
+
ClassNames
.
LINE_NUMBERS
+
lineHeightClassName
+
'
" style="left:
'
+
this
.
_lineNumbersLeft
.
toString
()
+
'
px;width:
'
+
this
.
_lineNumbersWidth
.
toString
()
+
'
px;">
'
;
let
common
=
'
<div class="
'
+
ClassNames
.
LINE_NUMBERS
+
lineHeightClassName
+
'
" style="left:
'
+
this
.
_lineNumbersLeft
.
toString
()
+
'
px;width:
'
+
this
.
_lineNumbersWidth
.
toString
()
+
'
px;
height:
'
+
lineHeight
+
'
px;
">
'
;
let
output
:
string
[]
=
[];
for
(
let
lineNumber
=
visibleStartLineNumber
;
lineNumber
<=
visibleEndLineNumber
;
lineNumber
++
)
{
...
...
src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.css
浏览文件 @
9b06d439
...
...
@@ -14,5 +14,4 @@
*/
.monaco-editor
.margin-view-overlays
.cldr
{
position
:
absolute
;
height
:
100%
;
}
\ No newline at end of file
src/vs/editor/browser/viewParts/linesDecorations/linesDecorations.ts
浏览文件 @
9b06d439
...
...
@@ -14,6 +14,7 @@ import { IRenderingContext } from 'vs/editor/common/view/renderingContext';
export
class
LinesDecorationsOverlay
extends
DedupOverlay
{
private
_context
:
ViewContext
;
private
_lineHeight
:
number
;
private
_decorationsLeft
:
number
;
private
_decorationsWidth
:
number
;
...
...
@@ -22,6 +23,7 @@ export class LinesDecorationsOverlay extends DedupOverlay {
constructor
(
context
:
ViewContext
)
{
super
();
this
.
_context
=
context
;
this
.
_lineHeight
=
this
.
_context
.
configuration
.
editor
.
lineHeight
;
this
.
_decorationsLeft
=
0
;
this
.
_decorationsWidth
=
0
;
this
.
_renderResult
=
null
;
...
...
@@ -61,6 +63,9 @@ export class LinesDecorationsOverlay extends DedupOverlay {
return
false
;
}
public
onConfigurationChanged
(
e
:
editorCommon
.
IConfigurationChangedEvent
):
boolean
{
if
(
e
.
lineHeight
)
{
this
.
_lineHeight
=
this
.
_context
.
configuration
.
editor
.
lineHeight
;
}
return
true
;
}
public
onLayoutChanged
(
layoutInfo
:
editorCommon
.
EditorLayoutInfo
):
boolean
{
...
...
@@ -90,13 +95,18 @@ export class LinesDecorationsOverlay extends DedupOverlay {
}
public
prepareRender
(
ctx
:
IRenderingContext
):
void
{
if
(
!
this
.
shouldRender
())
{
throw
new
Error
(
'
I did not ask to render!
'
);
}
let
visibleStartLineNumber
=
ctx
.
visibleRange
.
startLineNumber
;
let
visibleEndLineNumber
=
ctx
.
visibleRange
.
endLineNumber
;
let
toRender
=
this
.
_render
(
visibleStartLineNumber
,
visibleEndLineNumber
,
this
.
_getDecorations
(
ctx
));
let
lineHeight
=
this
.
_lineHeight
.
toString
();
let
left
=
this
.
_decorationsLeft
.
toString
();
let
width
=
this
.
_decorationsWidth
.
toString
();
let
common
=
'
" style="left:
'
+
left
+
'
px;width:
'
+
width
+
'
px;"></div>
'
;
let
common
=
'
" style="left:
'
+
left
+
'
px;width:
'
+
width
+
'
px
'
+
'
;height:
'
+
lineHeight
+
'
px
;"></div>
'
;
let
output
:
string
[]
=
[];
for
(
let
lineNumber
=
visibleStartLineNumber
;
lineNumber
<=
visibleEndLineNumber
;
lineNumber
++
)
{
...
...
@@ -116,6 +126,10 @@ export class LinesDecorationsOverlay extends DedupOverlay {
if
(
!
this
.
_renderResult
)
{
return
''
;
}
return
this
.
_renderResult
[
lineNumber
-
startLineNumber
];
let
lineIndex
=
lineNumber
-
startLineNumber
;
if
(
lineIndex
<
0
||
lineIndex
>=
this
.
_renderResult
.
length
)
{
throw
new
Error
(
'
Unexpected render request
'
);
}
return
this
.
_renderResult
[
lineIndex
];
}
}
\ No newline at end of file
src/vs/editor/browser/viewParts/margin/margin.ts
已删除
100644 → 0
浏览文件 @
ce97d438
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
{
StyleMutator
}
from
'
vs/base/browser/styleMutator
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
ViewPart
}
from
'
vs/editor/browser/view/viewPart
'
;
import
{
ViewContext
}
from
'
vs/editor/common/view/viewContext
'
;
import
{
IRenderingContext
,
IRestrictedRenderingContext
}
from
'
vs/editor/common/view/renderingContext
'
;
import
{
ILayoutProvider
}
from
'
vs/editor/browser/viewLayout/layoutProvider
'
;
export
class
Margin
extends
ViewPart
{
public
domNode
:
HTMLElement
;
private
_layoutProvider
:
ILayoutProvider
;
private
_canUseTranslate3d
:
boolean
;
private
_height
:
number
;
private
_contentLeft
:
number
;
constructor
(
context
:
ViewContext
,
layoutProvider
:
ILayoutProvider
)
{
super
(
context
);
this
.
_layoutProvider
=
layoutProvider
;
this
.
_canUseTranslate3d
=
this
.
_context
.
configuration
.
editor
.
viewInfo
.
canUseTranslate3d
;
this
.
domNode
=
this
.
_createDomNode
();
this
.
_height
=
this
.
_context
.
configuration
.
editor
.
layoutInfo
.
contentHeight
;
this
.
_contentLeft
=
this
.
_context
.
configuration
.
editor
.
layoutInfo
.
contentLeft
;
}
public
dispose
():
void
{
super
.
dispose
();
}
public
_createDomNode
():
HTMLElement
{
let
domNode
=
document
.
createElement
(
'
div
'
);
domNode
.
className
=
'
margin monaco-editor-background
'
;
domNode
.
style
.
position
=
'
absolute
'
;
domNode
.
setAttribute
(
'
role
'
,
'
presentation
'
);
domNode
.
setAttribute
(
'
aria-hidden
'
,
'
true
'
);
return
domNode
;
}
// --- begin event handlers
public
onConfigurationChanged
(
e
:
editorCommon
.
IConfigurationChangedEvent
):
boolean
{
if
(
e
.
viewInfo
.
canUseTranslate3d
)
{
this
.
_canUseTranslate3d
=
this
.
_context
.
configuration
.
editor
.
viewInfo
.
canUseTranslate3d
;
}
return
super
.
onConfigurationChanged
(
e
);
}
public
onScrollChanged
(
e
:
editorCommon
.
IScrollEvent
):
boolean
{
return
super
.
onScrollChanged
(
e
)
||
e
.
scrollTopChanged
;
}
public
onLayoutChanged
(
layoutInfo
:
editorCommon
.
EditorLayoutInfo
):
boolean
{
this
.
_contentLeft
=
layoutInfo
.
contentLeft
;
return
super
.
onLayoutChanged
(
layoutInfo
)
||
true
;
}
// --- end event handlers
public
prepareRender
(
ctx
:
IRenderingContext
):
void
{
// Nothing to read
}
public
render
(
ctx
:
IRestrictedRenderingContext
):
void
{
if
(
this
.
_canUseTranslate3d
)
{
let
transform
=
'
translate3d(0px,
'
+
ctx
.
linesViewportData
.
visibleRangesDeltaTop
+
'
px, 0px)
'
;
StyleMutator
.
setTransform
(
this
.
domNode
,
transform
);
StyleMutator
.
setTop
(
this
.
domNode
,
0
);
}
else
{
StyleMutator
.
setTransform
(
this
.
domNode
,
''
);
StyleMutator
.
setTop
(
this
.
domNode
,
ctx
.
linesViewportData
.
visibleRangesDeltaTop
);
}
let
height
=
Math
.
min
(
this
.
_layoutProvider
.
getTotalHeight
(),
1000000
);
StyleMutator
.
setHeight
(
this
.
domNode
,
height
);
StyleMutator
.
setWidth
(
this
.
domNode
,
this
.
_contentLeft
);
}
}
src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.css
已删除
100644 → 0
浏览文件 @
ce97d438
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
/*
Keeping name short for faster parsing.
cmdr = core margin decorations rendering (div)
*/
.monaco-editor
.margin-view-overlays
.cmdr
{
position
:
absolute
;
left
:
0
;
width
:
100%
;
height
:
100%
;
}
\ No newline at end of file
src/vs/editor/browser/viewParts/marginDecorations/marginDecorations.ts
已删除
100644 → 0
浏览文件 @
ce97d438
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'
use strict
'
;
import
'
vs/css!./marginDecorations
'
;
import
*
as
editorCommon
from
'
vs/editor/common/editorCommon
'
;
import
{
DecorationToRender
,
DedupOverlay
}
from
'
vs/editor/browser/viewParts/glyphMargin/glyphMargin
'
;
import
{
ViewContext
}
from
'
vs/editor/common/view/viewContext
'
;
import
{
IRenderingContext
}
from
'
vs/editor/common/view/renderingContext
'
;
export
class
MarginViewLineDecorationsOverlay
extends
DedupOverlay
{
private
_context
:
ViewContext
;
private
_renderResult
:
string
[];
constructor
(
context
:
ViewContext
)
{
super
();
this
.
_context
=
context
;
this
.
_renderResult
=
null
;
this
.
_context
.
addEventHandler
(
this
);
}
public
dispose
():
void
{
this
.
_context
.
removeEventHandler
(
this
);
this
.
_context
=
null
;
this
.
_renderResult
=
null
;
}
// --- begin event handlers
public
onModelFlushed
():
boolean
{
return
true
;
}
public
onModelDecorationsChanged
(
e
:
editorCommon
.
IViewDecorationsChangedEvent
):
boolean
{
return
true
;
}
public
onModelLinesDeleted
(
e
:
editorCommon
.
IViewLinesDeletedEvent
):
boolean
{
return
true
;
}
public
onModelLineChanged
(
e
:
editorCommon
.
IViewLineChangedEvent
):
boolean
{
return
true
;
}
public
onModelLinesInserted
(
e
:
editorCommon
.
IViewLinesInsertedEvent
):
boolean
{
return
true
;
}
public
onCursorPositionChanged
(
e
:
editorCommon
.
IViewCursorPositionChangedEvent
):
boolean
{
return
false
;
}
public
onCursorSelectionChanged
(
e
:
editorCommon
.
IViewCursorSelectionChangedEvent
):
boolean
{
return
false
;
}
public
onCursorRevealRange
(
e
:
editorCommon
.
IViewRevealRangeEvent
):
boolean
{
return
false
;
}
public
onConfigurationChanged
(
e
:
editorCommon
.
IConfigurationChangedEvent
):
boolean
{
return
true
;
}
public
onLayoutChanged
(
layoutInfo
:
editorCommon
.
EditorLayoutInfo
):
boolean
{
return
true
;
}
public
onScrollChanged
(
e
:
editorCommon
.
IScrollEvent
):
boolean
{
return
e
.
scrollTopChanged
;
}
public
onZonesChanged
():
boolean
{
return
true
;
}
// --- end event handlers
protected
_getDecorations
(
ctx
:
IRenderingContext
):
DecorationToRender
[]
{
let
decorations
=
ctx
.
getDecorationsInViewport
();
let
r
:
DecorationToRender
[]
=
[];
for
(
let
i
=
0
,
len
=
decorations
.
length
;
i
<
len
;
i
++
)
{
let
d
=
decorations
[
i
];
if
(
d
.
options
.
marginClassName
)
{
r
.
push
(
new
DecorationToRender
(
d
.
range
.
startLineNumber
,
d
.
range
.
endLineNumber
,
d
.
options
.
marginClassName
));
}
}
return
r
;
}
public
prepareRender
(
ctx
:
IRenderingContext
):
void
{
let
visibleStartLineNumber
=
ctx
.
visibleRange
.
startLineNumber
;
let
visibleEndLineNumber
=
ctx
.
visibleRange
.
endLineNumber
;
let
toRender
=
this
.
_render
(
visibleStartLineNumber
,
visibleEndLineNumber
,
this
.
_getDecorations
(
ctx
));
let
output
:
string
[]
=
[];
for
(
let
lineNumber
=
visibleStartLineNumber
;
lineNumber
<=
visibleEndLineNumber
;
lineNumber
++
)
{
let
lineIndex
=
lineNumber
-
visibleStartLineNumber
;
let
classNames
=
toRender
[
lineIndex
];
let
lineOutput
=
''
;
for
(
let
i
=
0
,
len
=
classNames
.
length
;
i
<
len
;
i
++
)
{
lineOutput
+=
'
<div class="cmdr
'
+
classNames
[
i
]
+
'
" style=""></div>
'
;
}
output
[
lineIndex
]
=
lineOutput
;
}
this
.
_renderResult
=
output
;
}
public
render
(
startLineNumber
:
number
,
lineNumber
:
number
):
string
{
if
(
!
this
.
_renderResult
)
{
return
''
;
}
return
this
.
_renderResult
[
lineNumber
-
startLineNumber
];
}
}
\ No newline at end of file
src/vs/editor/browser/viewParts/viewZones/viewZones.ts
浏览文件 @
9b06d439
...
...
@@ -34,31 +34,19 @@ export class ViewZones extends ViewPart {
private
_zones
:
{
[
id
:
string
]:
IMyViewZone
;
};
private
_lineHeight
:
number
;
private
_contentWidth
:
number
;
private
_contentLeft
:
number
;
public
domNode
:
HTMLElement
;
public
marginDomNode
:
HTMLElement
;
constructor
(
context
:
ViewContext
,
whitespaceManager
:
IWhitespaceManager
)
{
super
(
context
);
this
.
_lineHeight
=
this
.
_context
.
configuration
.
editor
.
lineHeight
;
this
.
_contentWidth
=
this
.
_context
.
configuration
.
editor
.
layoutInfo
.
contentWidth
;
this
.
_contentLeft
=
this
.
_context
.
configuration
.
editor
.
layoutInfo
.
contentLeft
;
this
.
_whitespaceManager
=
whitespaceManager
;
this
.
domNode
=
document
.
createElement
(
'
div
'
);
this
.
domNode
.
className
=
ClassNames
.
VIEW_ZONES
;
this
.
domNode
.
style
.
position
=
'
absolute
'
;
this
.
domNode
.
setAttribute
(
'
role
'
,
'
presentation
'
);
this
.
domNode
.
setAttribute
(
'
aria-hidden
'
,
'
true
'
);
this
.
marginDomNode
=
document
.
createElement
(
'
div
'
);
this
.
marginDomNode
.
className
=
'
margin-view-zones
'
;
this
.
marginDomNode
.
style
.
position
=
'
absolute
'
;
this
.
marginDomNode
.
setAttribute
(
'
role
'
,
'
presentation
'
);
this
.
marginDomNode
.
setAttribute
(
'
aria-hidden
'
,
'
true
'
);
this
.
_zones
=
{};
}
...
...
@@ -96,7 +84,6 @@ export class ViewZones extends ViewPart {
if
(
e
.
layoutInfo
)
{
this
.
_contentWidth
=
this
.
_context
.
configuration
.
editor
.
layoutInfo
.
contentWidth
;
this
.
_contentLeft
=
this
.
_context
.
configuration
.
editor
.
layoutInfo
.
contentLeft
;
}
return
false
;
...
...
@@ -200,19 +187,11 @@ export class ViewZones extends ViewPart {
myZone
.
delegate
.
domNode
.
style
.
position
=
'
absolute
'
;
myZone
.
delegate
.
domNode
.
style
.
width
=
'
100%
'
;
StyleMutator
.
setDisplay
(
myZone
.
delegate
.
domNode
,
'
none
'
);
myZone
.
delegate
.
domNode
.
setAttribute
(
'
monaco-view-zone
'
,
myZone
.
whitespaceId
.
toString
());
this
.
domNode
.
appendChild
(
myZone
.
delegate
.
domNode
);
if
(
myZone
.
delegate
.
marginDomNode
)
{
myZone
.
delegate
.
marginDomNode
.
style
.
position
=
'
absolute
'
;
myZone
.
delegate
.
marginDomNode
.
style
.
width
=
'
100%
'
;
StyleMutator
.
setDisplay
(
myZone
.
delegate
.
marginDomNode
,
'
none
'
);
myZone
.
delegate
.
marginDomNode
.
setAttribute
(
'
monaco-view-zone
'
,
myZone
.
whitespaceId
.
toString
());
this
.
marginDomNode
.
appendChild
(
myZone
.
delegate
.
marginDomNode
);
}
this
.
_zones
[
myZone
.
whitespaceId
.
toString
()]
=
myZone
;
myZone
.
delegate
.
domNode
.
setAttribute
(
'
monaco-view-zone
'
,
myZone
.
whitespaceId
.
toString
());
this
.
domNode
.
appendChild
(
myZone
.
delegate
.
domNode
);
this
.
setShouldRender
();
...
...
@@ -229,12 +208,6 @@ export class ViewZones extends ViewPart {
zone
.
delegate
.
domNode
.
removeAttribute
(
'
monaco-view-zone
'
);
zone
.
delegate
.
domNode
.
parentNode
.
removeChild
(
zone
.
delegate
.
domNode
);
if
(
zone
.
delegate
.
marginDomNode
)
{
zone
.
delegate
.
marginDomNode
.
removeAttribute
(
'
monaco-visible-view-zone
'
);
zone
.
delegate
.
marginDomNode
.
removeAttribute
(
'
monaco-view-zone
'
);
zone
.
delegate
.
marginDomNode
.
parentNode
.
removeChild
(
zone
.
delegate
.
marginDomNode
);
}
this
.
setShouldRender
();
return
true
;
...
...
@@ -319,40 +292,28 @@ export class ViewZones extends ViewPart {
let
id
=
keys
[
i
];
let
zone
=
this
.
_zones
[
id
];
let
newTop
=
0
;
let
newHeight
=
0
;
let
newDisplay
=
'
none
'
;
if
(
visibleZones
.
hasOwnProperty
(
id
))
{
newTop
=
visibleZones
[
id
].
verticalOffset
-
ctx
.
bigNumbersDelta
;
newHeight
=
visibleZones
[
id
].
height
;
newDisplay
=
'
block
'
;
// zone is visible
StyleMutator
.
setTop
(
zone
.
delegate
.
domNode
,
(
visibleZones
[
id
].
verticalOffset
-
ctx
.
bigNumbersDelta
));
StyleMutator
.
setHeight
(
zone
.
delegate
.
domNode
,
visibleZones
[
id
].
height
);
if
(
!
zone
.
isVisible
)
{
StyleMutator
.
setDisplay
(
zone
.
delegate
.
domNode
,
'
block
'
);
zone
.
delegate
.
domNode
.
setAttribute
(
'
monaco-visible-view-zone
'
,
'
true
'
);
zone
.
isVisible
=
true
;
}
this
.
_safeCallOnDomNodeTop
(
zone
.
delegate
,
ctx
.
getScrolledTopFromAbsoluteTop
(
visibleZones
[
id
].
verticalOffset
));
}
else
{
if
(
zone
.
isVisible
)
{
StyleMutator
.
setDisplay
(
zone
.
delegate
.
domNode
,
'
none
'
);
zone
.
delegate
.
domNode
.
removeAttribute
(
'
monaco-visible-view-zone
'
);
zone
.
isVisible
=
false
;
}
this
.
_safeCallOnDomNodeTop
(
zone
.
delegate
,
ctx
.
getScrolledTopFromAbsoluteTop
(
-
1000000
));
}
StyleMutator
.
setTop
(
zone
.
delegate
.
domNode
,
newTop
);
StyleMutator
.
setHeight
(
zone
.
delegate
.
domNode
,
newHeight
);
StyleMutator
.
setDisplay
(
zone
.
delegate
.
domNode
,
newDisplay
);
if
(
zone
.
delegate
.
marginDomNode
)
{
StyleMutator
.
setTop
(
zone
.
delegate
.
marginDomNode
,
newTop
);
StyleMutator
.
setHeight
(
zone
.
delegate
.
marginDomNode
,
newHeight
);
StyleMutator
.
setDisplay
(
zone
.
delegate
.
marginDomNode
,
newDisplay
);
}
}
if
(
hasVisibleZone
)
{
StyleMutator
.
setWidth
(
this
.
domNode
,
Math
.
max
(
ctx
.
scrollWidth
,
this
.
_contentWidth
));
StyleMutator
.
setWidth
(
this
.
marginDomNode
,
this
.
_contentLeft
);
}
}
}
src/vs/editor/browser/widget/diffEditorWidget.ts
浏览文件 @
9b06d439
...
...
@@ -847,10 +847,8 @@ export class DiffEditorWidget extends EventEmitter implements editorBrowser.IDif
clonedOptions
.
scrollbar
=
clonedOptions
.
scrollbar
||
{};
clonedOptions
.
scrollbar
.
vertical
=
'
visible
'
;
clonedOptions
.
folding
=
false
;
clonedOptions
.
glyphMargin
=
false
;
clonedOptions
.
codeLens
=
false
;
clonedOptions
.
fixedOverflowWidgets
=
true
;
clonedOptions
.
lineDecorationsWidth
=
'
2ch
'
;
return
clonedOptions
;
}
...
...
@@ -1494,15 +1492,8 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd
let
lineChange
=
lineChanges
[
i
];
if
(
isChangeOrDelete
(
lineChange
))
{
result
.
decorations
.
push
({
range
:
new
Range
(
lineChange
.
originalStartLineNumber
,
1
,
lineChange
.
originalEndLineNumber
,
Number
.
MAX_VALUE
),
options
:
{
className
:
'
line-delete
'
,
linesDecorationsClassName
:
'
delete-sign
'
,
marginClassName
:
'
line-delete
'
,
isWholeLine
:
true
}
});
result
.
decorations
.
push
(
createDecoration
(
lineChange
.
originalStartLineNumber
,
1
,
lineChange
.
originalEndLineNumber
,
Number
.
MAX_VALUE
,
'
line-delete
'
,
true
));
if
(
!
isChangeOrInsert
(
lineChange
)
||
!
lineChange
.
charChanges
)
{
result
.
decorations
.
push
(
createDecoration
(
lineChange
.
originalStartLineNumber
,
1
,
lineChange
.
originalEndLineNumber
,
Number
.
MAX_VALUE
,
'
char-delete
'
,
true
));
}
...
...
@@ -1562,15 +1553,7 @@ class DiffEdtorWidgetSideBySide extends DiffEditorWidgetStyle implements IDiffEd
if
(
isChangeOrInsert
(
lineChange
))
{
result
.
decorations
.
push
({
range
:
new
Range
(
lineChange
.
modifiedStartLineNumber
,
1
,
lineChange
.
modifiedEndLineNumber
,
Number
.
MAX_VALUE
),
options
:
{
className
:
'
line-insert
'
,
linesDecorationsClassName
:
'
insert-sign
'
,
marginClassName
:
'
line-insert
'
,
isWholeLine
:
true
}
});
result
.
decorations
.
push
(
createDecoration
(
lineChange
.
modifiedStartLineNumber
,
1
,
lineChange
.
modifiedEndLineNumber
,
Number
.
MAX_VALUE
,
'
line-insert
'
,
true
));
if
(
!
isChangeOrDelete
(
lineChange
)
||
!
lineChange
.
charChanges
)
{
result
.
decorations
.
push
(
createDecoration
(
lineChange
.
modifiedStartLineNumber
,
1
,
lineChange
.
modifiedEndLineNumber
,
Number
.
MAX_VALUE
,
'
char-insert
'
,
true
));
}
...
...
@@ -1688,13 +1671,6 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor
// Add overview zones in the overview ruler
if
(
isChangeOrDelete
(
lineChange
))
{
result
.
decorations
.
push
({
range
:
new
Range
(
lineChange
.
originalStartLineNumber
,
1
,
lineChange
.
originalEndLineNumber
,
Number
.
MAX_VALUE
),
options
:
{
marginClassName
:
'
line-delete
'
,
}
});
result
.
overviewZones
.
push
(
new
editorCommon
.
OverviewRulerZone
(
lineChange
.
originalStartLineNumber
,
lineChange
.
originalEndLineNumber
,
...
...
@@ -1723,15 +1699,7 @@ class DiffEdtorWidgetInline extends DiffEditorWidgetStyle implements IDiffEditor
// Add decorations & overview zones
if
(
isChangeOrInsert
(
lineChange
))
{
result
.
decorations
.
push
({
range
:
new
Range
(
lineChange
.
modifiedStartLineNumber
,
1
,
lineChange
.
modifiedEndLineNumber
,
Number
.
MAX_VALUE
),
options
:
{
className
:
'
line-insert
'
,
linesDecorationsClassName
:
'
insert-sign
'
,
marginClassName
:
'
line-insert
'
,
isWholeLine
:
true
}
});
result
.
decorations
.
push
(
createDecoration
(
lineChange
.
modifiedStartLineNumber
,
1
,
lineChange
.
modifiedEndLineNumber
,
Number
.
MAX_VALUE
,
'
line-insert
'
,
true
));
result
.
overviewZones
.
push
(
new
editorCommon
.
OverviewRulerZone
(
lineChange
.
modifiedStartLineNumber
,
...
...
@@ -1797,20 +1765,16 @@ class InlineViewZonesComputer extends ViewZonesComputer {
}
_produceOriginalFromDiff
(
lineChange
:
editorCommon
.
ILineChange
,
lineChangeOriginalLength
:
number
,
lineChangeModifiedLength
:
number
):
IMyViewZone
{
let
marginDomNode
=
document
.
createElement
(
'
div
'
);
marginDomNode
.
className
=
'
inline-added-margin-view-zone
'
;
Configuration
.
applyFontInfoSlow
(
marginDomNode
,
this
.
modifiedEditorConfiguration
.
fontInfo
);
return
{
afterLineNumber
:
Math
.
max
(
lineChange
.
originalStartLineNumber
,
lineChange
.
originalEndLineNumber
),
heightInLines
:
lineChangeModifiedLength
,
domNode
:
document
.
createElement
(
'
div
'
),
marginDomNode
:
marginDomNode
domNode
:
document
.
createElement
(
'
div
'
)
};
}
_produceModifiedFromDiff
(
lineChange
:
editorCommon
.
ILineChange
,
lineChangeOriginalLength
:
number
,
lineChangeModifiedLength
:
number
):
IMyViewZone
{
let
decorations
:
InlineDecoration
[]
=
[];
if
(
lineChange
.
charChanges
)
{
for
(
let
j
=
0
,
lengthJ
=
lineChange
.
charChanges
.
length
;
j
<
lengthJ
;
j
++
)
{
let
charChange
=
lineChange
.
charChanges
[
j
];
...
...
@@ -1824,16 +1788,8 @@ class InlineViewZonesComputer extends ViewZonesComputer {
}
let
html
:
string
[]
=
[];
let
marginHTML
:
string
[]
=
[];
let
lineDecorationsWidth
=
this
.
modifiedEditorConfiguration
.
layoutInfo
.
decorationsWidth
;
let
lineHeight
=
this
.
modifiedEditorConfiguration
.
lineHeight
;
for
(
let
lineNumber
=
lineChange
.
originalStartLineNumber
;
lineNumber
<=
lineChange
.
originalEndLineNumber
;
lineNumber
++
)
{
html
=
html
.
concat
(
this
.
renderOriginalLine
(
lineNumber
-
lineChange
.
originalStartLineNumber
,
this
.
originalModel
,
this
.
modifiedEditorConfiguration
,
this
.
modifiedEditorTabSize
,
lineNumber
,
decorations
));
let
index
=
lineNumber
-
lineChange
.
originalStartLineNumber
;
marginHTML
=
marginHTML
.
concat
([
`<div class="delete-sign" style="position:absolute;top:
${
index
*
lineHeight
}
px;width:
${
lineDecorationsWidth
}
px;height:
${
lineHeight
}
px;right:0;"></div>`
]);
}
let
domNode
=
document
.
createElement
(
'
div
'
);
...
...
@@ -1841,17 +1797,11 @@ class InlineViewZonesComputer extends ViewZonesComputer {
domNode
.
innerHTML
=
html
.
join
(
''
);
Configuration
.
applyFontInfoSlow
(
domNode
,
this
.
modifiedEditorConfiguration
.
fontInfo
);
let
marginDomNode
=
document
.
createElement
(
'
div
'
);
marginDomNode
.
className
=
'
inline-deleted-margin-view-zone
'
;
marginDomNode
.
innerHTML
=
marginHTML
.
join
(
''
);
Configuration
.
applyFontInfoSlow
(
marginDomNode
,
this
.
modifiedEditorConfiguration
.
fontInfo
);
return
{
shouldNotShrink
:
true
,
afterLineNumber
:
(
lineChange
.
modifiedEndLineNumber
===
0
?
lineChange
.
modifiedStartLineNumber
:
lineChange
.
modifiedStartLineNumber
-
1
),
heightInLines
:
lineChangeOriginalLength
,
domNode
:
domNode
,
marginDomNode
:
marginDomNode
domNode
:
domNode
};
}
...
...
src/vs/editor/browser/widget/media/addition-inverse.svg
已删除
100644 → 0
浏览文件 @
ce97d438
<svg
width=
"16"
height=
"16"
xmlns=
"http://www.w3.org/2000/svg"
><title>
Layer 1
</title><rect
height=
"11"
width=
"3"
y=
"3"
x=
"7"
fill=
"#C5C5C5"
/><rect
height=
"3"
width=
"11"
y=
"7"
x=
"3"
fill=
"#C5C5C5"
/></svg>
\ No newline at end of file
src/vs/editor/browser/widget/media/addition.svg
已删除
100644 → 0
浏览文件 @
ce97d438
<svg
width=
"16"
height=
"16"
xmlns=
"http://www.w3.org/2000/svg"
><title>
Layer 1
</title><rect
height=
"11"
width=
"3"
y=
"3"
x=
"7"
fill=
"#424242"
/><rect
height=
"3"
width=
"11"
y=
"7"
x=
"3"
fill=
"#424242"
/></svg>
\ No newline at end of file
src/vs/editor/browser/widget/media/deletion-inverse.svg
已删除
100644 → 0
浏览文件 @
ce97d438
<svg
width=
"16"
height=
"16"
xmlns=
"http://www.w3.org/2000/svg"
><title>
Layer 1
</title><rect
height=
"3"
width=
"11"
y=
"7"
x=
"3"
fill=
"#C5C5C5"
/></svg>
\ No newline at end of file
src/vs/editor/browser/widget/media/deletion.svg
已删除
100644 → 0
浏览文件 @
ce97d438
<svg
width=
"16"
height=
"16"
xmlns=
"http://www.w3.org/2000/svg"
><title>
Layer 1
</title><rect
height=
"3"
width=
"11"
y=
"7"
x=
"3"
fill=
"#424242"
/></svg>
\ No newline at end of file
src/vs/editor/browser/widget/media/diffEditor.css
浏览文件 @
9b06d439
...
...
@@ -49,28 +49,6 @@
.monaco-editor
.char-insert
{
background
:
rgba
(
155
,
185
,
85
,
0.2
);
}
.monaco-editor
.insert-sign
,
.monaco-editor
.delete-sign
{
background-size
:
60%
;
background-repeat
:
no-repeat
;
background-position
:
50%
50%
;
}
.monaco-editor
.insert-sign
{
background-image
:
url('addition.svg')
;
}
.monaco-editor
.delete-sign
{
background-image
:
url('deletion.svg')
;
}
.monaco-editor.vs-dark
.insert-sign
,
.monaco-editor.hc-black
.insert-sign
{
background-image
:
url('addition-inverse.svg')
;
}
.monaco-editor.vs-dark
.delete-sign
,
.monaco-editor.hc-black
.delete-sign
{
background-image
:
url('deletion-inverse.svg')
;
}
.monaco-editor
.inline-deleted-margin-view-zone
{
background
:
rgba
(
255
,
0
,
0
,
0.2
);
text-align
:
right
;
}
.monaco-editor
.inline-added-margin-view-zone
{
background
:
rgba
(
155
,
185
,
85
,
0.2
);
text-align
:
right
;
}
.monaco-editor.hc-black
.line-insert
,
.monaco-editor.hc-black
.char-insert
{
background
:
none
;
...
...
src/vs/editor/common/config/commonEditorConfig.ts
浏览文件 @
9b06d439
...
...
@@ -166,14 +166,7 @@ class InternalEditorOptionsHelper {
let
glyphMargin
=
toBoolean
(
opts
.
glyphMargin
);
let
lineNumbers
=
opts
.
lineNumbers
;
let
lineNumbersMinChars
=
toInteger
(
opts
.
lineNumbersMinChars
,
1
);
let
lineDecorationsWidth
:
number
;
if
(
typeof
opts
.
lineDecorationsWidth
===
'
string
'
&&
/^
\d
+
(\.\d
+
)?
ch$/
.
test
(
opts
.
lineDecorationsWidth
))
{
let
multiple
=
parseFloat
(
opts
.
lineDecorationsWidth
.
substr
(
0
,
opts
.
lineDecorationsWidth
.
length
-
2
));
lineDecorationsWidth
=
multiple
*
fontInfo
.
typicalHalfwidthCharacterWidth
;
}
else
{
lineDecorationsWidth
=
toInteger
(
opts
.
lineDecorationsWidth
,
0
);
}
let
lineDecorationsWidth
=
toInteger
(
opts
.
lineDecorationsWidth
,
0
);
if
(
opts
.
folding
)
{
lineDecorationsWidth
+=
16
;
}
...
...
src/vs/editor/common/editorCommon.ts
浏览文件 @
9b06d439
...
...
@@ -226,10 +226,9 @@ export interface IEditorOptions {
/**
* The width reserved for line decorations (in px).
* Line decorations are placed between line numbers and the editor content.
* You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch.
* Defaults to 10.
*/
lineDecorationsWidth
?:
number
|
string
;
lineDecorationsWidth
?:
number
;
/**
* When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle.
* This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport.
...
...
@@ -1151,10 +1150,6 @@ export interface IModelDecorationOptions {
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
*/
linesDecorationsClassName
?:
string
;
/**
* If set, the decoration will be rendered in the margin (covering its full width) with this CSS class name.
*/
marginClassName
?:
string
;
/**
* If set, the decoration will be rendered inline with the text with this CSS class name.
* Please use this only for CSS rules that must impact the text. For example, use `className`
...
...
src/vs/editor/common/model/textModelWithDecorations.ts
浏览文件 @
9b06d439
...
...
@@ -654,7 +654,6 @@ class ModelDecorationOptions implements editorCommon.IModelDecorationOptions {
overviewRuler
:
editorCommon
.
IModelDecorationOverviewRulerOptions
;
glyphMarginClassName
:
string
;
linesDecorationsClassName
:
string
;
marginClassName
:
string
;
inlineClassName
:
string
;
beforeContentClassName
:
string
;
afterContentClassName
:
string
;
...
...
@@ -668,7 +667,6 @@ class ModelDecorationOptions implements editorCommon.IModelDecorationOptions {
this
.
overviewRuler
=
_normalizeOverviewRulerOptions
(
options
.
overviewRuler
,
options
.
showInOverviewRuler
);
this
.
glyphMarginClassName
=
cleanClassName
(
options
.
glyphMarginClassName
||
strings
.
empty
);
this
.
linesDecorationsClassName
=
cleanClassName
(
options
.
linesDecorationsClassName
||
strings
.
empty
);
this
.
marginClassName
=
cleanClassName
(
options
.
marginClassName
||
strings
.
empty
);
this
.
inlineClassName
=
cleanClassName
(
options
.
inlineClassName
||
strings
.
empty
);
this
.
beforeContentClassName
=
cleanClassName
(
options
.
beforeContentClassName
||
strings
.
empty
);
this
.
afterContentClassName
=
cleanClassName
(
options
.
afterContentClassName
||
strings
.
empty
);
...
...
@@ -691,7 +689,6 @@ class ModelDecorationOptions implements editorCommon.IModelDecorationOptions {
&&
this
.
showInOverviewRuler
===
other
.
showInOverviewRuler
&&
this
.
glyphMarginClassName
===
other
.
glyphMarginClassName
&&
this
.
linesDecorationsClassName
===
other
.
linesDecorationsClassName
&&
this
.
marginClassName
===
other
.
marginClassName
&&
this
.
inlineClassName
===
other
.
inlineClassName
&&
this
.
beforeContentClassName
===
other
.
beforeContentClassName
&&
this
.
afterContentClassName
===
other
.
afterContentClassName
...
...
src/vs/monaco.d.ts
浏览文件 @
9b06d439
...
...
@@ -1088,10 +1088,9 @@ declare module monaco.editor {
/**
* The width reserved for line decorations (in px).
* Line decorations are placed between line numbers and the editor content.
* You can pass in a string in the format floating point followed by "ch". e.g. 1.3ch.
* Defaults to 10.
*/
lineDecorationsWidth
?:
number
|
string
;
lineDecorationsWidth
?:
number
;
/**
* When revealing the cursor, a virtual padding (px) is added to the cursor, turning it into a rectangle.
* This virtual padding ensures that the cursor gets revealed before hitting the edge of the viewport.
...
...
@@ -1582,10 +1581,6 @@ declare module monaco.editor {
* If set, the decoration will be rendered in the lines decorations with this CSS class name.
*/
linesDecorationsClassName
?:
string
;
/**
* If set, the decoration will be rendered in the margin (covering its full width) with this CSS class name.
*/
marginClassName
?:
string
;
/**
* If set, the decoration will be rendered inline with the text with this CSS class name.
* Please use this only for CSS rules that must impact the text. For example, use `className`
...
...
@@ -3517,10 +3512,6 @@ declare module monaco.editor {
* The dom node of the view zone
*/
domNode
:
HTMLElement
;
/**
* An optional dom node for the view zone that will be placed in the margin area.
*/
marginDomNode
?:
HTMLElement
;
/**
* Callback which gives the relative top of the view zone as it appears (taking scrolling into account).
*/
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录