Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
20cf2479
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,发现更多精彩内容 >>
提交
20cf2479
编写于
8月 09, 2017
作者:
T
t-amqi
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Spelling fixes
上级
42f932bd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
7 addition
and
7 deletion
+7
-7
extensions/merge-conflict/src/commandHandler.ts
extensions/merge-conflict/src/commandHandler.ts
+2
-2
extensions/merge-conflict/src/documentTracker.ts
extensions/merge-conflict/src/documentTracker.ts
+1
-1
extensions/merge-conflict/src/mergeConflictParser.ts
extensions/merge-conflict/src/mergeConflictParser.ts
+4
-4
未找到文件。
extensions/merge-conflict/src/commandHandler.ts
浏览文件 @
20cf2479
...
...
@@ -127,7 +127,7 @@ export default class CommandHandler implements vscode.Disposable {
// Figure out if the cursor is in current or incoming, we do this by seeing if
// the active position is before or after the range of the splitter or common
// ancesors marker. We can use this trick as the previous check in
// ances
t
ors marker. We can use this trick as the previous check in
// findConflictByActiveSelection will ensure it's within the conflict range, so
// we don't falsely identify "current" or "incoming" if outside of a conflict range.
if
(
editor
.
selection
.
active
.
isBefore
(
tokenAfterCurrentBlock
.
start
))
{
...
...
@@ -184,7 +184,7 @@ export default class CommandHandler implements vscode.Disposable {
conflict
=
args
[
1
];
}
else
{
// Attempt to find a conflict that matches the current cur
os
r position
// Attempt to find a conflict that matches the current cur
so
r position
conflict
=
await
this
.
findConflictContainingSelection
(
editor
);
}
...
...
extensions/merge-conflict/src/documentTracker.ts
浏览文件 @
20cf2479
...
...
@@ -57,7 +57,7 @@ export default class DocumentMergeConflictTracker implements vscode.Disposable,
let
key
=
this
.
getCacheKey
(
document
);
if
(
!
key
)
{
// Document doesnt have a uri, can't cache it, so return
// Document doesn
'
t have a uri, can't cache it, so return
return
Promise
.
resolve
(
this
.
getConflictsOrEmpty
(
document
,
[
origin
]));
}
...
...
extensions/merge-conflict/src/mergeConflictParser.ts
浏览文件 @
20cf2479
...
...
@@ -22,7 +22,7 @@ export class MergeConflictParser {
static
scanDocument
(
document
:
vscode
.
TextDocument
):
interfaces
.
IDocumentMergeConflict
[]
{
// Scan each line in the document, we already know there is atleast a <<<<<<< and
// Scan each line in the document, we already know there is at
least a <<<<<<< and
// >>>>>> marker within the document, we need to group these into conflict ranges.
// We initially build a scan match, that references the lines of the header, splitter
// and footer. This is then converted into a full descriptor containing all required
...
...
@@ -61,7 +61,7 @@ export class MergeConflictParser {
else
if
(
currentConflict
&&
!
currentConflict
.
splitter
&&
line
.
text
.
startsWith
(
splitterMarker
))
{
currentConflict
.
splitter
=
line
;
}
// Are we with
o
n a conflict block and is this a footer? >>>>>>>
// Are we with
i
n a conflict block and is this a footer? >>>>>>>
else
if
(
currentConflict
&&
line
.
text
.
startsWith
(
endFooterMarker
))
{
currentConflict
.
endFooter
=
line
;
...
...
@@ -92,9 +92,9 @@ export class MergeConflictParser {
let
tokenAfterCurrentBlock
:
vscode
.
TextLine
=
scanned
.
commonAncestors
[
0
]
||
scanned
.
splitter
;
// Assume that descriptor.current.header, descriptor.incoming.header and descriptor.spli
i
ter
// Assume that descriptor.current.header, descriptor.incoming.header and descriptor.spli
t
ter
// have valid ranges, fill in content and total ranges from these parts.
// NOTE: We need to shift the decor
t
ator range back one character so the splitter does not end up with
// NOTE: We need to shift the decorator range back one character so the splitter does not end up with
// two decoration colors (current and splitter), if we take the new line from the content into account
// the decorator will wrap to the next line.
return
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录