Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
9be88790
V
vscode
项目概览
掘金者说
/
vscode
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
未验证
提交
9be88790
编写于
7月 26, 2021
作者:
M
meganrogge
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix #129427
上级
3a1cf8e5
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
5 deletion
+26
-5
src/vs/platform/terminal/common/terminal.ts
src/vs/platform/terminal/common/terminal.ts
+1
-1
src/vs/workbench/contrib/terminal/browser/terminal.ts
src/vs/workbench/contrib/terminal/browser/terminal.ts
+2
-1
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
+13
-2
src/vs/workbench/contrib/terminal/browser/terminalService.ts
src/vs/workbench/contrib/terminal/browser/terminalService.ts
+10
-1
未找到文件。
src/vs/platform/terminal/common/terminal.ts
浏览文件 @
9be88790
...
@@ -632,4 +632,4 @@ export interface IExtensionTerminalProfile extends ITerminalProfileContribution
...
@@ -632,4 +632,4 @@ export interface IExtensionTerminalProfile extends ITerminalProfileContribution
}
}
export
type
ITerminalProfileObject
=
ITerminalExecutable
|
ITerminalProfileSource
|
IExtensionTerminalProfile
|
null
;
export
type
ITerminalProfileObject
=
ITerminalExecutable
|
ITerminalProfileSource
|
IExtensionTerminalProfile
|
null
;
export
type
ITerminalProfile
QuickpickObject
=
ITerminalProfile
|
IExtensionTerminalProfile
;
export
type
ITerminalProfile
Type
=
ITerminalProfile
|
IExtensionTerminalProfile
;
src/vs/workbench/contrib/terminal/browser/terminal.ts
浏览文件 @
9be88790
...
@@ -8,7 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
...
@@ -8,7 +8,7 @@ import { IDisposable } from 'vs/base/common/lifecycle';
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
URI
}
from
'
vs/base/common/uri
'
;
import
{
FindReplaceState
}
from
'
vs/editor/contrib/find/findState
'
;
import
{
FindReplaceState
}
from
'
vs/editor/contrib/find/findState
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
createDecorator
}
from
'
vs/platform/instantiation/common/instantiation
'
;
import
{
IShellLaunchConfig
,
ITerminalChildProcess
,
ITerminalDimensions
,
ITerminalLaunchError
,
ITerminalProfile
,
ITerminalTabLayoutInfoById
,
TerminalIcon
,
TitleEventSource
,
TerminalShellType
,
ICreateContributedTerminalProfileOptions
,
ICreateTerminalOptions
,
TerminalLocation
,
IExtensionTerminalProfile
}
from
'
vs/platform/terminal/common/terminal
'
;
import
{
IShellLaunchConfig
,
ITerminalChildProcess
,
ITerminalDimensions
,
ITerminalLaunchError
,
ITerminalProfile
,
ITerminalTabLayoutInfoById
,
TerminalIcon
,
TitleEventSource
,
TerminalShellType
,
ICreateContributedTerminalProfileOptions
,
ICreateTerminalOptions
,
TerminalLocation
,
IExtensionTerminalProfile
,
ITerminalProfileType
}
from
'
vs/platform/terminal/common/terminal
'
;
import
{
ICommandTracker
,
INavigationMode
,
IOffProcessTerminalService
,
IRemoteTerminalAttachTarget
,
IStartExtensionTerminalRequest
,
ITerminalConfigHelper
,
ITerminalProcessExtHostProxy
}
from
'
vs/workbench/contrib/terminal/common/terminal
'
;
import
{
ICommandTracker
,
INavigationMode
,
IOffProcessTerminalService
,
IRemoteTerminalAttachTarget
,
IStartExtensionTerminalRequest
,
ITerminalConfigHelper
,
ITerminalProcessExtHostProxy
}
from
'
vs/workbench/contrib/terminal/common/terminal
'
;
import
type
{
Terminal
as
XTermTerminal
}
from
'
xterm
'
;
import
type
{
Terminal
as
XTermTerminal
}
from
'
xterm
'
;
import
type
{
SearchAddon
as
XTermSearchAddon
}
from
'
xterm-addon-search
'
;
import
type
{
SearchAddon
as
XTermSearchAddon
}
from
'
xterm-addon-search
'
;
...
@@ -108,6 +108,7 @@ export interface ITerminalService extends ITerminalInstanceHost {
...
@@ -108,6 +108,7 @@ export interface ITerminalService extends ITerminalInstanceHost {
isProcessSupportRegistered
:
boolean
;
isProcessSupportRegistered
:
boolean
;
readonly
connectionState
:
TerminalConnectionState
;
readonly
connectionState
:
TerminalConnectionState
;
readonly
availableProfiles
:
ITerminalProfile
[];
readonly
availableProfiles
:
ITerminalProfile
[];
readonly
allProfiles
:
ITerminalProfileType
[]
|
undefined
;
readonly
profilesReady
:
Promise
<
void
>
;
readonly
profilesReady
:
Promise
<
void
>
;
initializeTerminals
():
Promise
<
void
>
;
initializeTerminals
():
Promise
<
void
>
;
...
...
src/vs/workbench/contrib/terminal/browser/terminalActions.ts
浏览文件 @
9be88790
...
@@ -165,8 +165,19 @@ export function registerTerminalActions() {
...
@@ -165,8 +165,19 @@ export function registerTerminalActions() {
let
event
:
MouseEvent
|
PointerEvent
|
KeyboardEvent
|
undefined
;
let
event
:
MouseEvent
|
PointerEvent
|
KeyboardEvent
|
undefined
;
let
options
:
ICreateTerminalOptions
|
undefined
;
let
options
:
ICreateTerminalOptions
|
undefined
;
if
(
typeof
eventOrOptionsOrProfile
===
'
object
'
&&
eventOrOptionsOrProfile
&&
'
profileName
'
in
eventOrOptionsOrProfile
)
{
if
(
typeof
eventOrOptionsOrProfile
===
'
object
'
&&
eventOrOptionsOrProfile
&&
(
'
profileName
'
in
eventOrOptionsOrProfile
||
'
title
'
in
eventOrOptionsOrProfile
))
{
const
config
=
terminalService
.
availableProfiles
.
find
(
profile
=>
profile
.
profileName
===
eventOrOptionsOrProfile
.
profileName
);
const
config
=
terminalService
.
allProfiles
?.
find
(
profile
=>
{
if
(
profile
)
{
if
(
'
title
'
in
profile
)
{
return
profile
.
title
===
eventOrOptionsOrProfile
.
profileName
;
}
else
if
(
'
profileName
'
in
profile
)
{
return
profile
.
profileName
===
eventOrOptionsOrProfile
.
profileName
;
}
else
{
return
false
;
}
}
return
false
;
});
if
(
!
config
)
{
if
(
!
config
)
{
throw
new
Error
(
`Could not find terminal profile "
${
eventOrOptionsOrProfile
.
profileName
}
"`
);
throw
new
Error
(
`Could not find terminal profile "
${
eventOrOptionsOrProfile
.
profileName
}
"`
);
}
}
...
...
src/vs/workbench/contrib/terminal/browser/terminalService.ts
浏览文件 @
9be88790
...
@@ -23,7 +23,7 @@ import { ILabelService } from 'vs/platform/label/common/label';
...
@@ -23,7 +23,7 @@ import { ILabelService } from 'vs/platform/label/common/label';
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
INotificationService
}
from
'
vs/platform/notification/common/notification
'
;
import
{
IKeyMods
,
IPickOptions
,
IQuickInputButton
,
IQuickInputService
,
IQuickPickItem
,
IQuickPickSeparator
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
IKeyMods
,
IPickOptions
,
IQuickInputButton
,
IQuickInputService
,
IQuickPickItem
,
IQuickPickSeparator
}
from
'
vs/platform/quickinput/common/quickInput
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ITelemetryService
}
from
'
vs/platform/telemetry/common/telemetry
'
;
import
{
ICreateContributedTerminalProfileOptions
,
ICreateTerminalOptions
,
IExtensionTerminalProfile
,
IShellLaunchConfig
,
ITerminalLaunchError
,
ITerminalProfile
,
ITerminalProfileObject
,
ITerminalsLayoutInfo
,
ITerminalsLayoutInfoById
,
TerminalLocation
,
TerminalSettingId
,
TerminalSettingPrefix
}
from
'
vs/platform/terminal/common/terminal
'
;
import
{
ICreateContributedTerminalProfileOptions
,
ICreateTerminalOptions
,
IExtensionTerminalProfile
,
IShellLaunchConfig
,
ITerminalLaunchError
,
ITerminalProfile
,
ITerminalProfileObject
,
ITerminal
ProfileType
,
ITerminal
sLayoutInfo
,
ITerminalsLayoutInfoById
,
TerminalLocation
,
TerminalSettingId
,
TerminalSettingPrefix
}
from
'
vs/platform/terminal/common/terminal
'
;
import
{
registerTerminalDefaultProfileConfiguration
}
from
'
vs/platform/terminal/common/terminalPlatformConfiguration
'
;
import
{
registerTerminalDefaultProfileConfiguration
}
from
'
vs/platform/terminal/common/terminalPlatformConfiguration
'
;
import
{
iconForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
iconForeground
}
from
'
vs/platform/theme/common/colorRegistry
'
;
import
{
IconDefinition
}
from
'
vs/platform/theme/common/iconRegistry
'
;
import
{
IconDefinition
}
from
'
vs/platform/theme/common/iconRegistry
'
;
...
@@ -80,6 +80,15 @@ export class TerminalService implements ITerminalService {
...
@@ -80,6 +80,15 @@ export class TerminalService implements ITerminalService {
this
.
_refreshAvailableProfiles
();
this
.
_refreshAvailableProfiles
();
return
this
.
_availableProfiles
||
[];
return
this
.
_availableProfiles
||
[];
}
}
get
allProfiles
():
ITerminalProfileType
[]
|
undefined
{
if
(
this
.
_availableProfiles
)
{
const
profiles
:
ITerminalProfileType
[]
=
[];
profiles
.
concat
(
this
.
_availableProfiles
);
profiles
.
concat
(
this
.
_terminalContributionService
.
terminalProfiles
);
return
profiles
;
}
return
undefined
;
}
get
configHelper
():
ITerminalConfigHelper
{
return
this
.
_configHelper
;
}
get
configHelper
():
ITerminalConfigHelper
{
return
this
.
_configHelper
;
}
get
instances
():
ITerminalInstance
[]
{
get
instances
():
ITerminalInstance
[]
{
return
this
.
_terminalGroupService
.
instances
.
concat
(
this
.
_terminalEditorService
.
instances
);
return
this
.
_terminalGroupService
.
instances
.
concat
(
this
.
_terminalEditorService
.
instances
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录