Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
982051a3
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,发现更多精彩内容 >>
提交
982051a3
编写于
10月 14, 2018
作者:
B
Benjamin Pasero
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sqlite - fix close boolean flag
上级
0c5a3da3
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
18 addition
and
23 deletion
+18
-23
src/vs/editor/contrib/suggest/suggestMemory.ts
src/vs/editor/contrib/suggest/suggestMemory.ts
+7
-9
src/vs/platform/storage/electron-browser/storageService.ts
src/vs/platform/storage/electron-browser/storageService.ts
+3
-1
src/vs/workbench/electron-browser/workbench.ts
src/vs/workbench/electron-browser/workbench.ts
+2
-3
src/vs/workbench/parts/search/browser/searchView.ts
src/vs/workbench/parts/search/browser/searchView.ts
+6
-10
未找到文件。
src/vs/editor/contrib/suggest/suggestMemory.ts
浏览文件 @
982051a3
...
...
@@ -11,7 +11,7 @@ import { IPosition } from 'vs/editor/common/core/position';
import
{
RunOnceScheduler
}
from
'
vs/base/common/async
'
;
import
{
CompletionItemKind
,
completionKindFromLegacyString
}
from
'
vs/editor/common/modes
'
;
import
{
ICodeEditor
}
from
'
vs/editor/browser/editorBrowser
'
;
import
{
I
Disposable
}
from
'
vs/base/common/lifecycle
'
;
import
{
Disposable
}
from
'
vs/base/common/lifecycle
'
;
export
abstract
class
Memory
{
...
...
@@ -194,26 +194,24 @@ export class PrefixMemory extends Memory {
export
type
MemMode
=
'
first
'
|
'
recentlyUsed
'
|
'
recentlyUsedByPrefix
'
;
export
class
SuggestMemories
{
export
class
SuggestMemories
extends
Disposable
{
private
readonly
_storagePrefix
=
'
suggest/memories
'
;
private
_mode
:
MemMode
;
private
_strategy
:
Memory
;
private
readonly
_persistSoon
:
RunOnceScheduler
;
private
readonly
_listener
:
IDisposable
;
constructor
(
editor
:
ICodeEditor
,
@
IStorageService
private
readonly
_storageService
:
IStorageService
,
)
{
this
.
_persistSoon
=
new
RunOnceScheduler
(()
=>
this
.
_flush
(),
3000
);
this
.
_setMode
(
editor
.
getConfiguration
().
contribInfo
.
suggestSelection
);
this
.
_listener
=
editor
.
onDidChangeConfiguration
(
e
=>
e
.
contribInfo
&&
this
.
_setMode
(
editor
.
getConfiguration
().
contribInfo
.
suggestSelection
));
}
super
();
dispose
():
void
{
this
.
_listener
.
dispose
();
this
.
_persistSoon
=
this
.
_register
(
new
RunOnceScheduler
(()
=>
this
.
_flush
(),
3000
));
this
.
_setMode
(
editor
.
getConfiguration
().
contribInfo
.
suggestSelection
);
this
.
_register
(
editor
.
onDidChangeConfiguration
(
e
=>
e
.
contribInfo
&&
this
.
_setMode
(
editor
.
getConfiguration
().
contribInfo
.
suggestSelection
)));
this
.
_register
(
_storageService
.
onWillClose
(()
=>
this
.
_flush
()));
}
private
_setMode
(
mode
:
MemMode
):
void
{
...
...
src/vs/platform/storage/electron-browser/storageService.ts
浏览文件 @
982051a3
...
...
@@ -189,9 +189,11 @@ export class DelegatingStorageService extends Disposable implements IStorageServ
}
close
(
reason
:
ShutdownReason
):
Promise
<
void
>
{
const
promise
=
this
.
storageService
.
close
(
reason
);
this
.
closed
=
true
;
return
this
.
storageService
.
close
(
reason
)
;
return
promise
;
}
private
convertScope
(
scope
:
StorageScope
):
StorageLegacyScope
{
...
...
src/vs/workbench/electron-browser/workbench.ts
浏览文件 @
982051a3
...
...
@@ -1132,7 +1132,7 @@ export class Workbench extends Disposable implements IPartService {
// Restore sidebar if we are being shutdown as a matter of a reload
if
(
reason
===
ShutdownReason
.
RELOAD
)
{
this
.
storageService
.
store
(
Workbench
.
sidebarRestoreStorageKey
,
'
true
'
,
StorageScope
.
WORKSPACE
);
this
.
storageService
.
store
(
Workbench
.
sidebarRestoreStorageKey
,
true
,
StorageScope
.
WORKSPACE
);
}
// Preserve zen mode only on reload. Real quit gets out of zen mode so novice users do not get stuck in zen mode.
...
...
@@ -1335,8 +1335,7 @@ export class Workbench extends Disposable implements IPartService {
this
.
shouldCenterLayout
=
active
;
let
smartActive
=
active
;
if
(
this
.
editorPart
.
groups
.
length
>
1
&&
this
.
configurationService
.
getValue
(
'
workbench.editor.centeredLayoutAutoResize
'
))
{
// Respect the auto resize setting - do not go into centered layout if there is more than 1 group.
smartActive
=
false
;
smartActive
=
false
;
// Respect the auto resize setting - do not go into centered layout if there is more than 1 group.
}
// Enter Centered Editor Layout
...
...
src/vs/workbench/parts/search/browser/searchView.ts
浏览文件 @
982051a3
...
...
@@ -64,7 +64,6 @@ const $ = dom.$;
export
class
SearchView
extends
Viewlet
implements
IViewlet
,
IPanel
{
private
static
readonly
MAX_TEXT_RESULTS
=
10000
;
private
static
readonly
SHOW_REPLACE_STORAGE_KEY
=
'
vs.search.show.replace
'
;
private
static
readonly
WIDE_CLASS_NAME
=
'
wide
'
;
private
static
readonly
WIDE_VIEW_SIZE
=
600
;
...
...
@@ -120,7 +119,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
@
IProgressService
private
progressService
:
IProgressService
,
@
INotificationService
private
notificationService
:
INotificationService
,
@
IDialogService
private
dialogService
:
IDialogService
,
@
IStorageService
private
storageService
:
IStorageService
,
@
IStorageService
storageService
:
IStorageService
,
@
IContextViewService
private
contextViewService
:
IContextViewService
,
@
IInstantiationService
private
instantiationService
:
IInstantiationService
,
@
IConfigurationService
configurationService
:
IConfigurationService
,
...
...
@@ -310,6 +309,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
const
history
=
this
.
searchHistoryService
.
load
();
let
searchHistory
=
history
.
search
||
this
.
viewletState
[
'
query.searchHistory
'
]
||
[];
let
replaceHistory
=
history
.
replace
||
this
.
viewletState
[
'
query.replaceHistory
'
]
||
[];
let
showReplace
=
typeof
this
.
viewletState
[
'
view.showReplace
'
]
===
'
boolean
'
?
this
.
viewletState
[
'
view.showReplace
'
]
:
true
;
this
.
searchWidget
=
this
.
_register
(
this
.
instantiationService
.
createInstance
(
SearchWidget
,
container
,
<
ISearchWidgetOptions
>
{
value
:
contentPattern
,
...
...
@@ -320,7 +320,7 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
replaceHistory
:
replaceHistory
}));
if
(
this
.
storageService
.
getBoolean
(
SearchView
.
SHOW_REPLACE_STORAGE_KEY
,
StorageScope
.
WORKSPACE
,
true
)
)
{
if
(
showReplace
)
{
this
.
searchWidget
.
toggleReplace
(
true
);
}
...
...
@@ -367,13 +367,6 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
private
onReplaceToggled
():
void
{
this
.
layout
(
this
.
size
);
const
isReplaceShown
=
this
.
searchAndReplaceWidget
.
isReplaceShown
();
if
(
!
isReplaceShown
)
{
this
.
storageService
.
store
(
SearchView
.
SHOW_REPLACE_STORAGE_KEY
,
false
,
StorageScope
.
WORKSPACE
);
}
else
{
this
.
storageService
.
remove
(
SearchView
.
SHOW_REPLACE_STORAGE_KEY
,
StorageScope
.
WORKSPACE
);
}
}
private
onSearchResultsChanged
(
event
?:
IChangeEvent
):
TPromise
<
any
>
{
...
...
@@ -1522,6 +1515,9 @@ export class SearchView extends Viewlet implements IViewlet, IPanel {
this
.
viewletState
[
'
query.folderIncludes
'
]
=
patternIncludes
;
this
.
viewletState
[
'
query.useExcludesAndIgnoreFiles
'
]
=
useExcludesAndIgnoreFiles
;
const
isReplaceShown
=
this
.
searchAndReplaceWidget
.
isReplaceShown
();
this
.
viewletState
[
'
view.showReplace
'
]
=
isReplaceShown
;
const
searchHistory
=
this
.
searchWidget
.
getSearchHistory
();
const
replaceHistory
=
this
.
searchWidget
.
getReplaceHistory
();
const
patternExcludesHistory
=
this
.
inputPatternExcludes
.
getHistory
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录