Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b1d9a055
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,发现更多精彩内容 >>
提交
b1d9a055
编写于
11月 26, 2015
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Quick open widget doesn't acknowledge tree.reveal(...) as a promise
上级
f38e086b
变更
3
显示空白变更内容
内联
并排
Showing
3 changed file
with
8 addition
and
6 deletion
+8
-6
src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
+4
-4
src/vs/workbench/browser/viewlet.ts
src/vs/workbench/browser/viewlet.ts
+2
-1
src/vs/workbench/parts/files/browser/views/workingFilesView.ts
...s/workbench/parts/files/browser/views/workingFilesView.ts
+2
-1
未找到文件。
src/vs/base/parts/quickopen/browser/quickOpenWidget.ts
浏览文件 @
b1d9a055
...
@@ -343,7 +343,7 @@ export class QuickOpenWidget implements IModelProvider {
...
@@ -343,7 +343,7 @@ export class QuickOpenWidget implements IModelProvider {
// Reveal
// Reveal
focus
=
this
.
tree
.
getFocus
();
focus
=
this
.
tree
.
getFocus
();
if
(
focus
)
{
if
(
focus
)
{
revealToTop
?
this
.
tree
.
reveal
(
focus
,
0
)
:
this
.
tree
.
reveal
(
focus
);
revealToTop
?
this
.
tree
.
reveal
(
focus
,
0
)
.
done
(
null
,
errors
.
onUnexpectedError
)
:
this
.
tree
.
reveal
(
focus
).
done
(
null
,
errors
.
onUnexpectedError
);
}
}
}
}
...
@@ -543,7 +543,7 @@ export class QuickOpenWidget implements IModelProvider {
...
@@ -543,7 +543,7 @@ export class QuickOpenWidget implements IModelProvider {
let
entryToFocus
=
caseSensitiveMatch
||
caseInsensitiveMatch
;
let
entryToFocus
=
caseSensitiveMatch
||
caseInsensitiveMatch
;
if
(
entryToFocus
)
{
if
(
entryToFocus
)
{
this
.
tree
.
setFocus
(
entryToFocus
);
this
.
tree
.
setFocus
(
entryToFocus
);
this
.
tree
.
reveal
(
entryToFocus
,
0
);
this
.
tree
.
reveal
(
entryToFocus
,
0
)
.
done
(
null
,
errors
.
onUnexpectedError
)
;
return
;
return
;
}
}
...
@@ -552,14 +552,14 @@ export class QuickOpenWidget implements IModelProvider {
...
@@ -552,14 +552,14 @@ export class QuickOpenWidget implements IModelProvider {
// Second check for auto focus of first entry
// Second check for auto focus of first entry
if
(
autoFocus
.
autoFocusFirstEntry
)
{
if
(
autoFocus
.
autoFocusFirstEntry
)
{
this
.
tree
.
focusFirst
();
this
.
tree
.
focusFirst
();
this
.
tree
.
reveal
(
this
.
tree
.
getFocus
(),
0
);
this
.
tree
.
reveal
(
this
.
tree
.
getFocus
(),
0
)
.
done
(
null
,
errors
.
onUnexpectedError
)
;
}
}
// Third check for specific index option
// Third check for specific index option
else
if
(
typeof
autoFocus
.
autoFocusIndex
===
'
number
'
)
{
else
if
(
typeof
autoFocus
.
autoFocusIndex
===
'
number
'
)
{
if
(
entries
.
length
>
autoFocus
.
autoFocusIndex
)
{
if
(
entries
.
length
>
autoFocus
.
autoFocusIndex
)
{
this
.
tree
.
focusNth
(
autoFocus
.
autoFocusIndex
);
this
.
tree
.
focusNth
(
autoFocus
.
autoFocusIndex
);
this
.
tree
.
reveal
(
this
.
tree
.
getFocus
());
this
.
tree
.
reveal
(
this
.
tree
.
getFocus
())
.
done
(
null
,
errors
.
onUnexpectedError
)
;
}
}
}
}
...
...
src/vs/workbench/browser/viewlet.ts
浏览文件 @
b1d9a055
...
@@ -7,6 +7,7 @@
...
@@ -7,6 +7,7 @@
import
nls
=
require
(
'
vs/nls
'
);
import
nls
=
require
(
'
vs/nls
'
);
import
{
Promise
,
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
{
Promise
,
TPromise
}
from
'
vs/base/common/winjs.base
'
;
import
DOM
=
require
(
'
vs/base/browser/dom
'
);
import
DOM
=
require
(
'
vs/base/browser/dom
'
);
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
{
IEventEmitter
}
from
'
vs/base/common/eventEmitter
'
;
import
{
IEventEmitter
}
from
'
vs/base/common/eventEmitter
'
;
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
Registry
}
from
'
vs/platform/platform
'
;
import
{
Dimension
,
Builder
,
$
}
from
'
vs/base/browser/builder
'
;
import
{
Dimension
,
Builder
,
$
}
from
'
vs/base/browser/builder
'
;
...
@@ -283,7 +284,7 @@ export abstract class ViewerViewlet extends Viewlet {
...
@@ -283,7 +284,7 @@ export abstract class ViewerViewlet extends Viewlet {
// Make sure the current selected element is revealed
// Make sure the current selected element is revealed
let
selection
=
this
.
viewer
.
getSelection
();
let
selection
=
this
.
viewer
.
getSelection
();
if
(
selection
.
length
>
0
)
{
if
(
selection
.
length
>
0
)
{
this
.
reveal
(
selection
[
0
],
0.5
);
this
.
reveal
(
selection
[
0
],
0.5
)
.
done
(
null
,
errors
.
onUnexpectedError
)
;
}
}
// Pass Focus to Viewer
// Pass Focus to Viewer
...
...
src/vs/workbench/parts/files/browser/views/workingFilesView.ts
浏览文件 @
b1d9a055
...
@@ -14,6 +14,7 @@ import workbenchEditorCommon = require('vs/workbench/common/editor');
...
@@ -14,6 +14,7 @@ import workbenchEditorCommon = require('vs/workbench/common/editor');
import
{
CollapsibleState
}
from
'
vs/base/browser/ui/splitview/splitview
'
;
import
{
CollapsibleState
}
from
'
vs/base/browser/ui/splitview/splitview
'
;
import
{
IWorkingFileEntry
,
IWorkingFilesModel
,
IWorkingFileModelChangeEvent
,
LocalFileChangeEvent
,
EventType
as
FileEventType
,
IFilesConfiguration
,
ITextFileService
}
from
'
vs/workbench/parts/files/common/files
'
;
import
{
IWorkingFileEntry
,
IWorkingFilesModel
,
IWorkingFileModelChangeEvent
,
LocalFileChangeEvent
,
EventType
as
FileEventType
,
IFilesConfiguration
,
ITextFileService
}
from
'
vs/workbench/parts/files/common/files
'
;
import
dom
=
require
(
'
vs/base/browser/dom
'
);
import
dom
=
require
(
'
vs/base/browser/dom
'
);
import
errors
=
require
(
'
vs/base/common/errors
'
);
import
{
EditorEvent
,
EventType
as
WorkbenchEventType
,
UntitledEditorEvent
}
from
'
vs/workbench/browser/events
'
;
import
{
EditorEvent
,
EventType
as
WorkbenchEventType
,
UntitledEditorEvent
}
from
'
vs/workbench/browser/events
'
;
import
{
AdaptiveCollapsibleViewletView
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
AdaptiveCollapsibleViewletView
}
from
'
vs/workbench/browser/viewlet
'
;
import
{
CloseWorkingFileAction
,
SaveAllAction
}
from
'
vs/workbench/parts/files/browser/fileActions
'
;
import
{
CloseWorkingFileAction
,
SaveAllAction
}
from
'
vs/workbench/parts/files/browser/fileActions
'
;
...
@@ -275,7 +276,7 @@ export class WorkingFilesView extends AdaptiveCollapsibleViewletView {
...
@@ -275,7 +276,7 @@ export class WorkingFilesView extends AdaptiveCollapsibleViewletView {
if
(
entry
)
{
if
(
entry
)
{
this
.
tree
.
setFocus
(
entry
);
this
.
tree
.
setFocus
(
entry
);
this
.
tree
.
setSelection
([
entry
]);
this
.
tree
.
setSelection
([
entry
]);
this
.
tree
.
reveal
(
entry
);
this
.
tree
.
reveal
(
entry
)
.
done
(
null
,
errors
.
onUnexpectedError
)
;
}
}
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录