Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
4e24bef6
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,发现更多精彩内容 >>
未验证
提交
4e24bef6
编写于
11月 09, 2020
作者:
A
Alex Dima
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💄
上级
54ba2bad
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
22 deletion
+14
-22
src/vs/editor/browser/widget/diffEditorWidget.ts
src/vs/editor/browser/widget/diffEditorWidget.ts
+14
-22
未找到文件。
src/vs/editor/browser/widget/diffEditorWidget.ts
浏览文件 @
4e24bef6
...
...
@@ -102,8 +102,8 @@ class VisualEditorState {
// (1) View zones
if
(
this
.
_zones
.
length
>
0
)
{
editor
.
changeViewZones
((
viewChangeAccessor
:
editorBrowser
.
IViewZoneChangeAccessor
)
=>
{
for
(
let
i
=
0
,
length
=
this
.
_zones
.
length
;
i
<
length
;
i
++
)
{
viewChangeAccessor
.
removeZone
(
this
.
_zones
[
i
]
);
for
(
const
zoneId
of
this
.
_zones
)
{
viewChangeAccessor
.
removeZone
(
zoneId
);
}
});
}
...
...
@@ -120,11 +120,11 @@ class VisualEditorState {
// view zones
editor
.
changeViewZones
((
viewChangeAccessor
:
editorBrowser
.
IViewZoneChangeAccessor
)
=>
{
for
(
let
i
=
0
,
length
=
this
.
_zones
.
length
;
i
<
length
;
i
++
)
{
viewChangeAccessor
.
removeZone
(
this
.
_zones
[
i
]
);
for
(
const
zoneId
of
this
.
_zones
)
{
viewChangeAccessor
.
removeZone
(
zoneId
);
}
for
(
let
i
=
0
,
length
=
this
.
inlineDiffMargins
.
length
;
i
<
length
;
i
++
)
{
this
.
inlineDiffMargins
[
i
]
.
dispose
();
for
(
const
inlineDiffMargin
of
this
.
inlineDiffMargins
)
{
inlineDiffMargin
.
dispose
();
}
this
.
_zones
=
[];
this
.
_zonesMap
=
{};
...
...
@@ -1818,8 +1818,7 @@ export class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle implements
let
originalModel
=
originalEditor
.
getModel
()
!
;
for
(
let
i
=
0
,
length
=
lineChanges
.
length
;
i
<
length
;
i
++
)
{
let
lineChange
=
lineChanges
[
i
];
for
(
const
lineChange
of
lineChanges
)
{
if
(
isChangeOrDelete
(
lineChange
))
{
result
.
decorations
.
push
({
...
...
@@ -1837,8 +1836,7 @@ export class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle implements
));
if
(
lineChange
.
charChanges
)
{
for
(
let
j
=
0
,
lengthJ
=
lineChange
.
charChanges
.
length
;
j
<
lengthJ
;
j
++
)
{
let
charChange
=
lineChange
.
charChanges
[
j
];
for
(
const
charChange
of
lineChange
.
charChanges
)
{
if
(
isChangeOrDelete
(
charChange
))
{
if
(
ignoreTrimWhitespace
)
{
for
(
let
lineNumber
=
charChange
.
originalStartLineNumber
;
lineNumber
<=
charChange
.
originalEndLineNumber
;
lineNumber
++
)
{
...
...
@@ -1878,8 +1876,7 @@ export class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle implements
let
modifiedModel
=
modifiedEditor
.
getModel
()
!
;
for
(
let
i
=
0
,
length
=
lineChanges
.
length
;
i
<
length
;
i
++
)
{
let
lineChange
=
lineChanges
[
i
];
for
(
const
lineChange
of
lineChanges
)
{
if
(
isChangeOrInsert
(
lineChange
))
{
...
...
@@ -1897,8 +1894,7 @@ export class DiffEditorWidgetSideBySide extends DiffEditorWidgetStyle implements
));
if
(
lineChange
.
charChanges
)
{
for
(
let
j
=
0
,
lengthJ
=
lineChange
.
charChanges
.
length
;
j
<
lengthJ
;
j
++
)
{
let
charChange
=
lineChange
.
charChanges
[
j
];
for
(
const
charChange
of
lineChange
.
charChanges
)
{
if
(
isChangeOrInsert
(
charChange
))
{
if
(
ignoreTrimWhitespace
)
{
for
(
let
lineNumber
=
charChange
.
modifiedStartLineNumber
;
lineNumber
<=
charChange
.
modifiedEndLineNumber
;
lineNumber
++
)
{
...
...
@@ -1996,8 +1992,7 @@ class DiffEditorWidgetInline extends DiffEditorWidgetStyle implements IDiffEdito
overviewZones
:
[]
};
for
(
let
i
=
0
,
length
=
lineChanges
.
length
;
i
<
length
;
i
++
)
{
let
lineChange
=
lineChanges
[
i
];
for
(
const
lineChange
of
lineChanges
)
{
// Add overview zones in the overview ruler
if
(
isChangeOrDelete
(
lineChange
))
{
...
...
@@ -2027,8 +2022,7 @@ class DiffEditorWidgetInline extends DiffEditorWidgetStyle implements IDiffEdito
let
modifiedModel
=
modifiedEditor
.
getModel
()
!
;
for
(
let
i
=
0
,
length
=
lineChanges
.
length
;
i
<
length
;
i
++
)
{
let
lineChange
=
lineChanges
[
i
];
for
(
const
lineChange
of
lineChanges
)
{
// Add decorations & overview zones
if
(
isChangeOrInsert
(
lineChange
))
{
...
...
@@ -2044,8 +2038,7 @@ class DiffEditorWidgetInline extends DiffEditorWidgetStyle implements IDiffEdito
));
if
(
lineChange
.
charChanges
)
{
for
(
let
j
=
0
,
lengthJ
=
lineChange
.
charChanges
.
length
;
j
<
lengthJ
;
j
++
)
{
let
charChange
=
lineChange
.
charChanges
[
j
];
for
(
const
charChange
of
lineChange
.
charChanges
)
{
if
(
isChangeOrInsert
(
charChange
))
{
if
(
ignoreTrimWhitespace
)
{
for
(
let
lineNumber
=
charChange
.
modifiedStartLineNumber
;
lineNumber
<=
charChange
.
modifiedEndLineNumber
;
lineNumber
++
)
{
...
...
@@ -2120,8 +2113,7 @@ class InlineViewZonesComputer extends ViewZonesComputer {
protected
_produceModifiedFromDiff
(
lineChange
:
editorCommon
.
ILineChange
,
lineChangeOriginalLength
:
number
,
lineChangeModifiedLength
:
number
):
IMyViewZone
|
null
{
let
decorations
:
InlineDecoration
[]
=
[];
if
(
lineChange
.
charChanges
)
{
for
(
let
j
=
0
,
lengthJ
=
lineChange
.
charChanges
.
length
;
j
<
lengthJ
;
j
++
)
{
let
charChange
=
lineChange
.
charChanges
[
j
];
for
(
const
charChange
of
lineChange
.
charChanges
)
{
if
(
isChangeOrDelete
(
charChange
))
{
decorations
.
push
(
new
InlineDecoration
(
new
Range
(
charChange
.
originalStartLineNumber
,
charChange
.
originalStartColumn
,
charChange
.
originalEndLineNumber
,
charChange
.
originalEndColumn
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录