Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
徽霖
Vscode
提交
71fcfc46
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,发现更多精彩内容 >>
提交
71fcfc46
编写于
8月 12, 2019
作者:
A
Andre Weinand
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
support empty window when debugging extensions
上级
3ecbf67c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
11 deletion
+24
-11
src/vs/code/electron-main/windows.ts
src/vs/code/electron-main/windows.ts
+4
-5
src/vs/workbench/browser/web.simpleservices.ts
src/vs/workbench/browser/web.simpleservices.ts
+19
-5
src/vs/workbench/services/environment/browser/environmentService.ts
...kbench/services/environment/browser/environmentService.ts
+1
-1
未找到文件。
src/vs/code/electron-main/windows.ts
浏览文件 @
71fcfc46
...
...
@@ -1256,10 +1256,9 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
openConfig
.
cli
[
'
file-uri
'
]
=
fileUris
;
// if there are no files or folders cli args left, use the "remote" cli argument
if
(
!
cliArgs
.
length
&&
!
folderUris
.
length
&&
!
fileUris
.
length
)
{
if
(
authority
)
{
openConfig
.
cli
.
remote
=
authority
;
}
const
noFilesOrFolders
=
!
cliArgs
.
length
&&
!
folderUris
.
length
&&
!
fileUris
.
length
;
if
(
noFilesOrFolders
&&
authority
)
{
openConfig
.
cli
.
remote
=
authority
;
}
// Open it
...
...
@@ -1267,7 +1266,7 @@ export class WindowsManager extends Disposable implements IWindowsMainService {
context
:
openConfig
.
context
,
cli
:
openConfig
.
cli
,
forceNewWindow
:
true
,
forceEmpty
:
!
cliArgs
.
length
&&
!
folderUris
.
length
&&
!
fileUris
.
length
,
forceEmpty
:
noFilesOrFolders
,
userEnv
:
openConfig
.
userEnv
,
noRecentEntry
:
true
,
waitMarkerFileURI
:
openConfig
.
waitMarkerFileURI
...
...
src/vs/workbench/browser/web.simpleservices.ts
浏览文件 @
71fcfc46
...
...
@@ -658,6 +658,15 @@ export class SimpleWindowsService implements IWindowsService {
// we pass the "ParsedArgs" as query parameters of the URL
let
newAddress
=
`
${
document
.
location
.
origin
}
/?`
;
let
gotFolder
=
false
;
const
addQueryParameter
=
(
key
:
string
,
value
:
string
)
=>
{
const
lastChar
=
newAddress
.
charAt
(
newAddress
.
length
-
1
);
if
(
lastChar
!==
'
?
'
&&
lastChar
!==
'
&
'
)
{
newAddress
+=
'
&
'
;
}
newAddress
+=
`
${
key
}
=
${
encodeURIComponent
(
value
)}
`
;
};
const
f
=
args
[
'
folder-uri
'
];
if
(
f
)
{
...
...
@@ -670,9 +679,14 @@ export class SimpleWindowsService implements IWindowsService {
u
=
URI
.
parse
(
f
);
}
if
(
u
)
{
newAddress
+=
`folder=
${
encodeURIComponent
(
u
.
path
)}
`
;
gotFolder
=
true
;
addQueryParameter
(
'
folder
'
,
u
.
path
);
}
}
if
(
!
gotFolder
)
{
// request empty window
addQueryParameter
(
'
ew
'
,
'
true
'
);
}
const
ep
=
args
[
'
extensionDevelopmentPath
'
];
if
(
ep
)
{
...
...
@@ -685,23 +699,23 @@ export class SimpleWindowsService implements IWindowsService {
u
=
ep
;
}
if
(
u
)
{
newAddress
+=
`&edp=
${
encodeURIComponent
(
u
)}
`
;
addQueryParameter
(
'
edp
'
,
u
)
;
}
}
const
di
=
args
[
'
debugId
'
];
if
(
di
)
{
newAddress
+=
`&di=
${
encodeURIComponent
(
di
)}
`
;
addQueryParameter
(
'
di
'
,
di
)
;
}
const
ibe
=
args
[
'
inspect-brk-extensions
'
];
if
(
ibe
)
{
newAddress
+=
`&ibe=
${
encodeURIComponent
(
ibe
)}
`
;
addQueryParameter
(
'
ibe
'
,
ibe
)
;
}
// add connection token
if
(
this
.
workbenchEnvironmentService
.
configuration
.
connectionToken
)
{
newAddress
+=
`&tkn=
${
this
.
workbenchEnvironmentService
.
configuration
.
connectionToken
}
`
;
addQueryParameter
(
'
tkn
'
,
this
.
workbenchEnvironmentService
.
configuration
.
connectionToken
)
;
}
window
.
open
(
newAddress
);
...
...
src/vs/workbench/services/environment/browser/environmentService.ts
浏览文件 @
71fcfc46
...
...
@@ -105,7 +105,7 @@ export class BrowserWorkbenchEnvironmentService implements IEnvironmentService {
for
(
let
p
of
vars
)
{
const
pair
=
p
.
split
(
'
=
'
);
if
(
pair
.
length
>=
2
)
{
map
.
set
(
decodeURIComponent
(
pair
[
0
])
,
decodeURIComponent
(
pair
[
1
]));
map
.
set
(
pair
[
0
]
,
decodeURIComponent
(
pair
[
1
]));
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录