Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
64005b74
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
64005b74
编写于
7月 31, 2018
作者:
P
Peng Lyu
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
resolve conflicts for folding, git and comment in glyph
上级
897bdf7b
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
13 deletion
+32
-13
src/vs/editor/contrib/folding/folding.ts
src/vs/editor/contrib/folding/folding.ts
+5
-2
src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
...ch/parts/comments/electron-browser/commentThreadWidget.ts
+1
-1
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
...s/comments/electron-browser/commentsEditorContribution.ts
+2
-2
src/vs/workbench/parts/comments/electron-browser/media/review.css
...orkbench/parts/comments/electron-browser/media/review.css
+16
-6
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
...orkbench/parts/scm/electron-browser/dirtydiffDecorator.ts
+7
-2
src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css
...h/parts/scm/electron-browser/media/dirtydiffDecorator.css
+1
-0
未找到文件。
src/vs/editor/contrib/folding/folding.ts
浏览文件 @
64005b74
...
...
@@ -332,10 +332,13 @@ export class FoldingController implements IEditorContribution {
switch
(
e
.
target
.
type
)
{
case
MouseTargetType
.
GUTTER_LINE_DECORATIONS
:
const
data
=
e
.
target
.
detail
as
IMarginData
;
const
gutterOffsetX
=
data
.
offsetX
-
data
.
glyphMarginWidth
-
data
.
lineNumbersWidth
-
data
.
glyphMarginLeft
;
const
offsetLeftInGutter
=
(
e
.
target
.
element
as
HTMLElement
).
offsetLeft
;
const
gutterOffsetX
=
data
.
offsetX
-
offsetLeftInGutter
;
// const gutterOffsetX = data.offsetX - data.glyphMarginWidth - data.lineNumbersWidth - data.glyphMarginLeft;
// TODO@joao TODO@alex TODO@martin this is such that we don't collide with dirty diff
if
(
gutterOffsetX
<
=
10
)
{
if
(
gutterOffsetX
<
10
)
{
return
;
}
...
...
src/vs/workbench/parts/comments/electron-browser/commentThreadWidget.ts
浏览文件 @
64005b74
...
...
@@ -523,7 +523,7 @@ export class ReviewZoneWidget extends ZoneWidget {
const
gutterOffsetX
=
data
.
offsetX
-
data
.
glyphMarginWidth
-
data
.
lineNumbersWidth
-
data
.
glyphMarginLeft
;
// don't collide with folding and git decorations
if
(
gutterOffsetX
<
10
&&
gutterOffsetX
>
19
)
{
if
(
gutterOffsetX
>
14
)
{
return
;
}
...
...
src/vs/workbench/parts/comments/electron-browser/commentsEditorContribution.ts
浏览文件 @
64005b74
...
...
@@ -102,7 +102,7 @@ class CommentingRangeDecorator {
isWholeLine
:
true
,
};
decorationOptions
.
linesDecorationsClassName
=
`comment-
dirty-diff
-glyph
${
className
}
`
;
decorationOptions
.
linesDecorationsClassName
=
`comment-
range
-glyph
${
className
}
`
;
return
ModelDecorationOptions
.
createDynamic
(
decorationOptions
);
}
...
...
@@ -423,7 +423,7 @@ export class ReviewController implements IEditorContribution {
const
gutterOffsetX
=
data
.
offsetX
-
data
.
glyphMarginWidth
-
data
.
lineNumbersWidth
-
data
.
glyphMarginLeft
;
// don't collide with folding and git decorations
if
(
gutterOffsetX
<
10
&&
gutterOffsetX
>
19
)
{
if
(
gutterOffsetX
>
14
)
{
return
;
}
...
...
src/vs/workbench/parts/comments/electron-browser/media/review.css
浏览文件 @
64005b74
...
...
@@ -241,12 +241,14 @@
position
:
relative
;
}
.monaco-editor
.comment-dirty-diff-glyph
{
margin-left
:
14px
;
.monaco-editor
.comment-range-glyph
{
margin-left
:
5px
;
width
:
4px
!important
;
cursor
:
pointer
;
z-index
:
10
;
}
.monaco-editor
.comment-
dirty-diff
-glyph
:before
{
.monaco-editor
.comment-
range
-glyph
:before
{
position
:
absolute
;
content
:
''
;
height
:
100%
;
...
...
@@ -255,7 +257,7 @@
transition
:
width
80ms
linear
,
left
80ms
linear
;
}
.monaco-editor
.margin-view-overlays
>
div
:hover
>
.comment-
dirty-diff
-glyph.comment-diff-added
:before
{
.monaco-editor
.margin-view-overlays
>
div
:hover
>
.comment-
range
-glyph.comment-diff-added
:before
{
position
:
absolute
;
content
:
'+'
;
height
:
100%
;
...
...
@@ -265,7 +267,11 @@
color
:
black
;
}
.monaco-editor
.comment-dirty-diff-glyph.comment-thread
:before
{
.monaco-editor
.comment-range-glyph.comment-thread
{
z-index
:
20
;
}
.monaco-editor
.comment-range-glyph.comment-thread
:before
{
position
:
absolute
;
content
:
'·'
;
height
:
100%
;
...
...
@@ -277,4 +283,8 @@
.monaco-editor.inline-comment
.margin-view-overlays
.folding
{
margin-left
:
14px
;
}
\ No newline at end of file
}
.monaco-editor.inline-comment
.margin-view-overlays
.dirty-diff-glyph
{
margin-left
:
14px
;
}
src/vs/workbench/parts/scm/electron-browser/dirtydiffDecorator.ts
浏览文件 @
64005b74
...
...
@@ -703,11 +703,16 @@ export class DirtyDiffController implements IEditorContribution {
return
;
}
if
(
e
.
target
.
element
.
className
.
indexOf
(
'
dirty-diff-glyph
'
)
<
0
)
{
return
;
}
const
data
=
e
.
target
.
detail
as
IMarginData
;
const
gutterOffsetX
=
data
.
offsetX
-
data
.
glyphMarginWidth
-
data
.
lineNumbersWidth
-
data
.
glyphMarginLeft
;
const
offsetLeftInGutter
=
(
e
.
target
.
element
as
HTMLElement
).
offsetLeft
;
const
gutterOffsetX
=
data
.
offsetX
-
offsetLeftInGutter
;
// TODO@joao TODO@alex TODO@martin this is such that we don't collide with folding
if
(
gutterOffsetX
>
10
)
{
if
(
gutterOffsetX
<
0
||
gutterOffsetX
>
10
)
{
return
;
}
...
...
src/vs/workbench/parts/scm/electron-browser/media/dirtydiffDecorator.css
浏览文件 @
64005b74
...
...
@@ -6,6 +6,7 @@
.monaco-editor
.dirty-diff-glyph
{
margin-left
:
5px
;
cursor
:
pointer
;
z-index
:
5
;
}
.monaco-editor
.dirty-diff-deleted
:after
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录