Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
80e98335
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,发现更多精彩内容 >>
提交
80e98335
编写于
3月 07, 2017
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
💄
上级
187e3206
变更
2
显示空白变更内容
内联
并排
Showing
2 changed file
with
17 addition
and
18 deletion
+17
-18
src/vs/workbench/browser/parts/editor/editorPart.ts
src/vs/workbench/browser/parts/editor/editorPart.ts
+7
-4
src/vs/workbench/common/editor/editorStacksModel.ts
src/vs/workbench/common/editor/editorStacksModel.ts
+10
-14
未找到文件。
src/vs/workbench/browser/parts/editor/editorPart.ts
浏览文件 @
80e98335
...
...
@@ -146,13 +146,15 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
const
config
=
configurationService
.
getConfiguration
<
IWorkbenchEditorConfiguration
>
();
if
(
config
&&
config
.
workbench
&&
config
.
workbench
.
editor
)
{
const
editorConfig
=
config
.
workbench
.
editor
;
this
.
tabOptions
=
{
previewEditors
:
editorConfig
.
enablePreview
,
showIcons
:
editorConfig
.
showIcons
,
showTabs
:
editorConfig
.
showTabs
,
tabCloseButton
:
editorConfig
.
tabCloseButton
};
this
.
revealIfOpen
=
config
.
workbench
.
editor
.
revealIfOpen
;
this
.
revealIfOpen
=
editorConfig
.
revealIfOpen
;
this
.
telemetryService
.
publicLog
(
'
workbenchEditorConfiguration
'
,
editorConfig
);
}
else
{
...
...
@@ -162,6 +164,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
showTabs
:
true
,
tabCloseButton
:
'
right
'
};
this
.
revealIfOpen
=
false
;
}
...
...
@@ -202,7 +205,7 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
this
.
_onTabOptionsChanged
.
fire
(
this
.
tabOptions
);
}
this
.
revealIfOpen
=
configuration
.
workbench
.
editor
.
revealIfOpen
;
this
.
revealIfOpen
=
editorConfig
.
revealIfOpen
;
}
}
...
...
@@ -1285,8 +1288,8 @@ export class EditorPart extends Part implements IEditorPart, IEditorGroupService
}
// Respect option to reveal an editor if it is open (not necessarily visible)
const
skipRe
use
=
(
options
&&
options
.
index
)
||
arg1
;
if
(
!
skipRe
use
&&
this
.
revealIfOpen
)
{
const
skipRe
vealIfOpen
=
(
options
&&
options
.
index
)
||
arg1
;
if
(
!
skipRe
vealIfOpen
&&
this
.
revealIfOpen
)
{
const
group
=
this
.
stacks
.
findGroup
(
input
);
if
(
group
)
{
return
this
.
stacks
.
positionOfGroup
(
group
);
...
...
src/vs/workbench/common/editor/editorStacksModel.ts
浏览文件 @
80e98335
...
...
@@ -944,27 +944,23 @@ export class EditorStacksModel implements IEditorStacksModel {
return
this
.
_groups
.
indexOf
(
group
);
}
public
findGroup
(
editorInput
:
EditorInput
,
activeOnly
?:
boolean
):
EditorGroup
{
// prefer to check activeGroup and activeEditor first
let
groupsToCheck
:
EditorGroup
[]
=
[];
const
activeGroup
=
this
.
activeGroup
;
if
(
activeGroup
)
{
groupsToCheck
.
push
(
activeGroup
);
}
this
.
groups
.
forEach
(
g
=>
{
if
(
g
!==
activeGroup
)
{
groupsToCheck
.
push
(
g
);
}
});
public
findGroup
(
editor
:
EditorInput
,
activeOnly
?:
boolean
):
EditorGroup
{
const
groupsToCheck
=
(
this
.
activeGroup
?
[
this
.
activeGroup
]
:
[]).
concat
(
this
.
groups
.
filter
(
g
=>
g
!==
this
.
activeGroup
));
for
(
let
i
=
0
;
i
<
groupsToCheck
.
length
;
i
++
)
{
let
editorsToCheck
:
EditorInput
[]
=
[];
const
group
=
groupsToCheck
[
i
];
const
activeEditor
=
group
.
activeEditor
;
if
(
activeEditor
)
{
editorsToCheck
.
push
(
activeEditor
);
}
group
.
getEditors
().
forEach
(
e
=>
{
if
(
e
!==
activeEditor
)
{
editorsToCheck
.
push
(
e
)
}
});
const
editorsToCheck
=
(
group
.
activeEditor
?
[
group
.
activeEditor
]
:
[]).
concat
(
group
.
getEditors
().
filter
(
e
=>
e
!==
group
.
activeEditor
));
for
(
let
j
=
0
;
j
<
editorsToCheck
.
length
;
j
++
)
{
const
editor
=
editorsToCheck
[
j
];
if
((
!
activeOnly
||
group
.
isActive
(
editor
))
&&
editorInput
.
matches
(
editor
))
{
const
editor
ToCheck
=
editorsToCheck
[
j
];
if
((
!
activeOnly
||
group
.
isActive
(
editorToCheck
))
&&
editor
.
matches
(
editorToCheck
))
{
return
group
;
}
}
}
return
undefined
;
return
void
0
;
}
public
positionOfGroup
(
group
:
IEditorGroup
):
Position
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录