Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
82190ef0
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,发现更多精彩内容 >>
提交
82190ef0
编写于
5月 14, 2019
作者:
J
Joao Moreno
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
341638b1
f607c9ba
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
23 addition
and
22 deletion
+23
-22
src/vs/code/browser/workbench/workbench.html
src/vs/code/browser/workbench/workbench.html
+3
-0
src/vs/workbench/browser/media/style.css
src/vs/workbench/browser/media/style.css
+4
-0
src/vs/workbench/browser/web.simpleservices.ts
src/vs/workbench/browser/web.simpleservices.ts
+10
-20
src/vs/workbench/browser/workbench.ts
src/vs/workbench/browser/workbench.ts
+6
-2
未找到文件。
src/vs/code/browser/workbench/workbench.html
浏览文件 @
82190ef0
...
...
@@ -3,6 +3,9 @@
<html>
<head>
<meta
charset=
"utf-8"
/>
<!-- Disable pinch zooming -->
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"
/>
</head>
<body
class=
"vs-dark"
aria-label=
""
>
</body>
...
...
src/vs/workbench/browser/media/style.css
浏览文件 @
82190ef0
...
...
@@ -39,6 +39,10 @@ body {
user-select
:
none
;
}
body
.web
{
position
:
fixed
;
/* prevent bounce effect */
}
@keyframes
fadeIn
{
from
{
opacity
:
0
;
}
to
{
opacity
:
1
;
}
}
.monaco-workbench
{
...
...
src/vs/workbench/browser/web.simpleservices.ts
浏览文件 @
82190ef0
...
...
@@ -58,11 +58,11 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
import
{
Color
,
RGBA
}
from
'
vs/base/common/color
'
;
import
{
ITunnelService
}
from
'
vs/platform/remote/common/tunnel
'
;
import
{
IWorkbenchEnvironmentService
}
from
'
vs/workbench/services/environment/common/environmentService
'
;
import
{
IFileService
}
from
'
vs/platform/files/common/files
'
;
export
const
workspaceResource
=
URI
.
f
rom
({
export
const
workspaceResource
=
URI
.
f
ile
((
<
any
>
self
).
USER_HOME_DIR
||
'
/
'
).
with
({
scheme
:
Schemas
.
vscodeRemote
,
authority
:
document
.
location
.
host
,
path
:
'
/
'
authority
:
document
.
location
.
host
});
//#region Backup File
...
...
@@ -702,7 +702,8 @@ export class SimpleSearchService implements ISearchService {
constructor
(
@
IModelService
private
modelService
:
IModelService
,
@
IEditorService
private
editorService
:
IEditorService
,
@
IUntitledEditorService
private
untitledEditorService
:
IUntitledEditorService
@
IUntitledEditorService
private
untitledEditorService
:
IUntitledEditorService
,
@
IFileService
private
fileService
:
IFileService
)
{
}
...
...
@@ -732,8 +733,8 @@ export class SimpleSearchService implements ISearchService {
return
Disposable
.
None
;
}
private
getLocalResults
(
query
:
ITextQuery
):
ResourceMap
<
IFileMatch
>
{
const
localResults
=
new
ResourceMap
<
IFileMatch
>
();
private
getLocalResults
(
query
:
ITextQuery
):
ResourceMap
<
IFileMatch
|
null
>
{
const
localResults
=
new
ResourceMap
<
IFileMatch
|
null
>
();
if
(
query
.
type
===
QueryType
.
Text
)
{
const
models
=
this
.
modelService
.
getModels
();
...
...
@@ -754,10 +755,8 @@ export class SimpleSearchService implements ISearchService {
}
}
// Don't support other resource schemes than files for now
// why is that? we should search for resources from other
// schemes
else
if
(
resource
.
scheme
!==
Schemas
.
file
)
{
// Block walkthrough, webview, etc.
else
if
(
!
this
.
fileService
.
canHandleResource
(
resource
))
{
return
;
}
...
...
@@ -766,8 +765,7 @@ export class SimpleSearchService implements ISearchService {
}
// Use editor API to find matches
// @ts-ignore
const
matches
=
model
.
findMatches
(
query
.
contentPattern
.
pattern
,
false
,
query
.
contentPattern
.
isRegExp
,
query
.
contentPattern
.
isCaseSensitive
,
query
.
contentPattern
.
isWordMatch
?
query
.
contentPattern
.
wordSeparators
:
null
,
false
,
query
.
maxResults
);
const
matches
=
model
.
findMatches
(
query
.
contentPattern
.
pattern
,
false
,
!!
query
.
contentPattern
.
isRegExp
,
!!
query
.
contentPattern
.
isCaseSensitive
,
query
.
contentPattern
.
isWordMatch
?
query
.
contentPattern
.
wordSeparators
!
:
null
,
false
,
query
.
maxResults
);
if
(
matches
.
length
)
{
const
fileMatch
=
new
FileMatch
(
resource
);
localResults
.
set
(
resource
,
fileMatch
);
...
...
@@ -775,7 +773,6 @@ export class SimpleSearchService implements ISearchService {
const
textSearchResults
=
editorMatchesToTextSearchResults
(
matches
,
model
,
query
.
previewOptions
);
fileMatch
.
results
=
addContextToEditorMatches
(
textSearchResults
,
model
,
query
);
}
else
{
// @ts-ignore
localResults
.
set
(
resource
,
null
);
}
});
...
...
@@ -785,13 +782,6 @@ export class SimpleSearchService implements ISearchService {
}
private
matches
(
resource
:
URI
,
query
:
ITextQuery
):
boolean
{
// includes
if
(
query
.
includePattern
)
{
if
(
resource
.
scheme
!==
Schemas
.
file
)
{
return
false
;
// if we match on file patterns, we have to ignore non file resources
}
}
return
pathIncludedInQuery
(
query
,
resource
.
fsPath
);
}
}
...
...
src/vs/workbench/browser/workbench.ts
浏览文件 @
82190ef0
...
...
@@ -14,7 +14,7 @@ import { getZoomLevel } from 'vs/base/browser/browser';
import
{
mark
}
from
'
vs/base/common/performance
'
;
import
{
onUnexpectedError
,
setUnexpectedErrorHandler
}
from
'
vs/base/common/errors
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
isWindows
,
isLinux
}
from
'
vs/base/common/platform
'
;
import
{
isWindows
,
isLinux
,
isWeb
}
from
'
vs/base/common/platform
'
;
import
{
IWorkbenchContributionsRegistry
,
Extensions
as
WorkbenchExtensions
}
from
'
vs/workbench/common/contributions
'
;
import
{
IEditorInputFactoryRegistry
,
Extensions
as
EditorExtensions
}
from
'
vs/workbench/common/editor
'
;
import
{
IActionBarRegistry
,
Extensions
as
ActionBarExtensions
}
from
'
vs/workbench/browser/actions
'
;
...
...
@@ -263,7 +263,11 @@ export class Workbench extends Layout {
]);
addClasses
(
this
.
container
,
...
workbenchClasses
);
addClasses
(
document
.
body
,
platformClass
);
// used by our fonts
addClass
(
document
.
body
,
platformClass
);
// used by our fonts
if
(
isWeb
)
{
addClass
(
document
.
body
,
'
web
'
);
}
// Apply font aliasing
this
.
setFontAliasing
(
configurationService
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录