Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
ab5dce24
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,发现更多精彩内容 >>
提交
ab5dce24
编写于
1月 28, 2016
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Up and down arrows should jump through splitview headers (fixes #2373)
上级
ddbb872c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
37 addition
and
8 deletion
+37
-8
src/vs/base/browser/ui/splitview/splitview.ts
src/vs/base/browser/ui/splitview/splitview.ts
+29
-0
src/vs/workbench/browser/viewlet.ts
src/vs/workbench/browser/viewlet.ts
+2
-2
src/vs/workbench/parts/debug/browser/debugViewlet.ts
src/vs/workbench/parts/debug/browser/debugViewlet.ts
+1
-1
src/vs/workbench/parts/files/browser/explorerViewlet.ts
src/vs/workbench/parts/files/browser/explorerViewlet.ts
+2
-2
src/vs/workbench/parts/files/browser/views/emptyView.ts
src/vs/workbench/parts/files/browser/views/emptyView.ts
+1
-1
src/vs/workbench/parts/files/browser/views/explorerView.ts
src/vs/workbench/parts/files/browser/views/explorerView.ts
+2
-2
未找到文件。
src/vs/base/browser/ui/splitview/splitview.ts
浏览文件 @
ab5dce24
...
...
@@ -93,6 +93,10 @@ export class View extends ee.EventEmitter {
// to implement
}
public
focus
():
void
{
// to implement
}
public
layout
(
size
:
number
,
orientation
:
Orientation
):
void
{
// to optionally implement
}
...
...
@@ -223,6 +227,12 @@ export class AbstractCollapsibleView extends HeaderView {
}
else
if
(
event
.
equals
(
CommonKeybindings
.
ESCAPE
))
{
this
.
header
.
blur
();
eventHandled
=
true
;
}
else
if
(
event
.
equals
(
CommonKeybindings
.
UP_ARROW
))
{
this
.
emit
(
'
focusPrevious
'
);
eventHandled
=
true
;
}
else
if
(
event
.
equals
(
CommonKeybindings
.
DOWN_ARROW
))
{
this
.
emit
(
'
focusNext
'
);
eventHandled
=
true
;
}
if
(
eventHandled
)
{
...
...
@@ -245,6 +255,12 @@ export class AbstractCollapsibleView extends HeaderView {
});
}
public
focus
():
void
{
if
(
this
.
header
)
{
this
.
header
.
focus
();
}
}
public
layout
(
size
:
number
,
orientation
:
Orientation
):
void
{
this
.
layoutHeader
();
super
.
layout
(
size
,
orientation
);
...
...
@@ -387,6 +403,8 @@ export class SplitView implements
private
viewElements
:
HTMLElement
[];
private
views
:
View
[];
private
viewChangeListeners
:
lifecycle
.
IDisposable
[];
private
viewFocusPreviousListeners
:
lifecycle
.
IDisposable
[];
private
viewFocusNextListeners
:
lifecycle
.
IDisposable
[];
private
initialWeights
:
number
[];
private
sashOrientation
:
sash
.
Orientation
;
private
sashes
:
sash
.
Sash
[];
...
...
@@ -412,6 +430,8 @@ export class SplitView implements
this
.
viewElements
=
[];
this
.
views
=
[];
this
.
viewChangeListeners
=
[];
this
.
viewFocusPreviousListeners
=
[];
this
.
viewFocusNextListeners
=
[];
this
.
initialWeights
=
[];
this
.
sashes
=
[];
this
.
sashesListeners
=
[];
...
...
@@ -475,6 +495,9 @@ export class SplitView implements
this
.
viewChangeListeners
.
splice
(
index
,
0
,
view
.
addListener2
(
'
change
'
,
size
=>
this
.
onViewChange
(
view
,
size
)));
this
.
onViewChange
(
view
,
view
.
minimumSize
);
this
.
viewFocusPreviousListeners
.
splice
(
index
,
0
,
view
.
addListener2
(
'
focusPrevious
'
,
()
=>
index
>
0
&&
this
.
views
[
index
-
1
].
focus
()));
this
.
viewFocusNextListeners
.
splice
(
index
,
0
,
view
.
addListener2
(
'
focusNext
'
,
()
=>
index
<
this
.
views
.
length
&&
this
.
views
[
index
+
1
].
focus
()));
}
public
removeView
(
view
:
View
):
void
{
...
...
@@ -495,6 +518,12 @@ export class SplitView implements
this
.
viewChangeListeners
[
index
].
dispose
();
this
.
viewChangeListeners
.
splice
(
index
,
1
);
this
.
viewFocusPreviousListeners
[
index
].
dispose
();
this
.
viewFocusPreviousListeners
.
splice
(
index
,
1
);
this
.
viewFocusNextListeners
[
index
].
dispose
();
this
.
viewFocusNextListeners
.
splice
(
index
,
1
);
this
.
views
.
splice
(
index
,
1
);
this
.
el
.
removeChild
(
this
.
viewElements
[
index
]);
this
.
viewElements
.
splice
(
index
,
1
);
...
...
src/vs/workbench/browser/viewlet.ts
浏览文件 @
ab5dce24
...
...
@@ -361,7 +361,7 @@ export class AdaptiveCollapsibleViewletView extends FixedCollapsibleView impleme
return
Promise
.
as
(
null
);
}
public
focus
():
void
{
public
focus
Body
():
void
{
focus
(
this
.
tree
);
}
...
...
@@ -488,7 +488,7 @@ export class CollapsibleViewletView extends CollapsibleView implements IViewletV
return
Promise
.
as
(
null
);
}
public
focus
():
void
{
public
focus
Body
():
void
{
focus
(
this
.
tree
);
}
...
...
src/vs/workbench/parts/debug/browser/debugViewlet.ts
浏览文件 @
ab5dce24
...
...
@@ -485,7 +485,7 @@ export class DebugViewlet extends viewlet.Viewlet {
super
.
focus
();
if
(
this
.
views
.
length
>
0
)
{
(
<
VariablesView
>
this
.
views
[
0
]).
focus
();
(
<
VariablesView
>
this
.
views
[
0
]).
focus
Body
();
}
}
...
...
src/vs/workbench/parts/files/browser/explorerViewlet.ts
浏览文件 @
ab5dce24
...
...
@@ -116,9 +116,9 @@ export class ExplorerViewlet extends Viewlet {
super
.
focus
();
if
(
this
.
explorerView
)
{
this
.
explorerView
.
focus
();
this
.
explorerView
.
focus
Body
();
}
else
if
(
this
.
workingFilesView
)
{
this
.
workingFilesView
.
focus
();
this
.
workingFilesView
.
focus
Body
();
}
}
...
...
src/vs/workbench/parts/files/browser/views/emptyView.ts
浏览文件 @
ab5dce24
...
...
@@ -68,7 +68,7 @@ export class EmptyView extends CollapsibleView {
return
Promise
.
as
(
null
);
}
public
focus
():
void
{
public
focus
Body
():
void
{
// Ignore
}
...
...
src/vs/workbench/parts/files/browser/views/explorerView.ts
浏览文件 @
ab5dce24
...
...
@@ -196,8 +196,8 @@ export class ExplorerView extends CollapsibleViewletView {
}
}
public
focus
():
void
{
super
.
focus
();
public
focus
Body
():
void
{
super
.
focus
Body
();
// Open the focused element in the editor if there is currently no file opened
let
input
=
this
.
editorService
.
getActiveEditorInput
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录