Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
掘金者说
vscode
提交
01be0003
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,发现更多精彩内容 >>
提交
01be0003
编写于
1月 17, 2018
作者:
D
Daniel Imms
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update to work with latest xterm.js
上级
3904a9d8
变更
6
显示空白变更内容
内联
并排
Showing
6 changed file
with
52 addition
and
3 deletion
+52
-3
src/typings/vscode-xterm.d.ts
src/typings/vscode-xterm.d.ts
+6
-0
src/vs/workbench/parts/terminal/common/terminal.ts
src/vs/workbench/parts/terminal/common/terminal.ts
+5
-0
src/vs/workbench/parts/terminal/electron-browser/media/xterm.css
...workbench/parts/terminal/electron-browser/media/xterm.css
+6
-2
src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts
.../parts/terminal/electron-browser/terminal.contribution.ts
+5
-1
src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts
...kbench/parts/terminal/electron-browser/terminalActions.ts
+21
-0
src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts
...bench/parts/terminal/electron-browser/terminalInstance.ts
+9
-0
未找到文件。
src/typings/vscode-xterm.d.ts
浏览文件 @
01be0003
...
...
@@ -332,6 +332,12 @@ declare module 'vscode-xterm' {
*/
deregisterLinkMatcher
(
matcherId
:
number
):
void
;
/**
* Enters screen reader navigation mode. This will only work when
* the screenReaderMode option is true.
*/
enterNavigationMode
():
void
;
/**
* Gets whether the terminal has an active selection.
*/
...
...
src/vs/workbench/parts/terminal/common/terminal.ts
浏览文件 @
01be0003
...
...
@@ -388,4 +388,9 @@ export interface ITerminalInstance {
* Sets the title of the terminal instance.
*/
setTitle
(
title
:
string
,
eventFromProcess
:
boolean
):
void
;
/**
* Enter screen reader navigation mode.
*/
enterNavigationMode
():
void
;
}
src/vs/workbench/parts/terminal/electron-browser/media/xterm.css
浏览文件 @
01be0003
...
...
@@ -127,7 +127,7 @@
cursor
:
text
;
}
.xterm
.accessibility
{
.xterm
.
xterm-
accessibility
{
position
:
absolute
;
left
:
0
;
top
:
0
;
...
...
@@ -136,10 +136,14 @@
z-index
:
100
;
}
.xterm
.accessibility-tree
{
.xterm
.
xterm-
accessibility-tree
{
color
:
transparent
;
}
.xterm
.xterm-accessibility-tree
:focus
[
id
^=
"xterm-active-item-"
]
{
outline
:
1px
solid
#F80
;
}
.xterm
.live-region
{
position
:
absolute
;
left
:
-9999px
;
...
...
src/vs/workbench/parts/terminal/electron-browser/terminal.contribution.ts
浏览文件 @
01be0003
...
...
@@ -18,7 +18,7 @@ import { TERMINAL_DEFAULT_SHELL_UNIX_LIKE, TERMINAL_DEFAULT_SHELL_WINDOWS } from
import
{
IWorkbenchActionRegistry
,
Extensions
as
ActionExtensions
}
from
'
vs/workbench/common/actions
'
;
import
{
KeyCode
,
KeyMod
}
from
'
vs/base/common/keyCodes
'
;
import
{
ContextKeyExpr
}
from
'
vs/platform/contextkey/common/contextkey
'
;
import
{
KillTerminalAction
,
CopyTerminalSelectionAction
,
CreateNewTerminalAction
,
CreateNewInActiveWorkspaceTerminalAction
,
FocusActiveTerminalAction
,
FocusNextTerminalAction
,
FocusPreviousTerminalAction
,
SelectDefaultShellWindowsTerminalAction
,
RunSelectedTextInTerminalAction
,
RunActiveFileInTerminalAction
,
ScrollDownTerminalAction
,
ScrollDownPageTerminalAction
,
ScrollToBottomTerminalAction
,
ScrollUpTerminalAction
,
ScrollUpPageTerminalAction
,
ScrollToTopTerminalAction
,
TerminalPasteAction
,
ToggleTerminalAction
,
ClearTerminalAction
,
AllowWorkspaceShellTerminalCommand
,
DisallowWorkspaceShellTerminalCommand
,
RenameTerminalAction
,
SelectAllTerminalAction
,
FocusTerminalFindWidgetAction
,
HideTerminalFindWidgetAction
,
ShowNextFindTermTerminalFindWidgetAction
,
ShowPreviousFindTermTerminalFindWidgetAction
,
DeleteWordLeftTerminalAction
,
DeleteWordRightTerminalAction
,
QuickOpenActionTermContributor
,
QuickOpenTermAction
,
TERMINAL_PICKER_PREFIX
}
from
'
vs/workbench/parts/terminal/electron-browser/terminalActions
'
;
import
{
KillTerminalAction
,
CopyTerminalSelectionAction
,
CreateNewTerminalAction
,
CreateNewInActiveWorkspaceTerminalAction
,
FocusActiveTerminalAction
,
FocusNextTerminalAction
,
FocusPreviousTerminalAction
,
SelectDefaultShellWindowsTerminalAction
,
RunSelectedTextInTerminalAction
,
RunActiveFileInTerminalAction
,
ScrollDownTerminalAction
,
ScrollDownPageTerminalAction
,
ScrollToBottomTerminalAction
,
ScrollUpTerminalAction
,
ScrollUpPageTerminalAction
,
ScrollToTopTerminalAction
,
TerminalPasteAction
,
ToggleTerminalAction
,
ClearTerminalAction
,
AllowWorkspaceShellTerminalCommand
,
DisallowWorkspaceShellTerminalCommand
,
RenameTerminalAction
,
SelectAllTerminalAction
,
FocusTerminalFindWidgetAction
,
HideTerminalFindWidgetAction
,
ShowNextFindTermTerminalFindWidgetAction
,
ShowPreviousFindTermTerminalFindWidgetAction
,
DeleteWordLeftTerminalAction
,
DeleteWordRightTerminalAction
,
QuickOpenActionTermContributor
,
QuickOpenTermAction
,
TERMINAL_PICKER_PREFIX
,
EnterLineNavigationModeTerminalAction
}
from
'
vs/workbench/parts/terminal/electron-browser/terminalActions
'
;
import
{
Registry
}
from
'
vs/platform/registry/common/platform
'
;
import
{
ShowAllCommandsAction
}
from
'
vs/workbench/parts/quickopen/browser/commandsHandler
'
;
import
{
SyncActionDescriptor
}
from
'
vs/platform/actions/common/actions
'
;
...
...
@@ -204,6 +204,7 @@ configurationRegistry.registerConfiguration({
FocusActiveTerminalAction
.
ID
,
FocusPreviousTerminalAction
.
ID
,
FocusNextTerminalAction
.
ID
,
EnterLineNavigationModeTerminalAction
.
ID
,
'
workbench.action.tasks.build
'
,
'
workbench.action.tasks.restartTask
'
,
'
workbench.action.tasks.runTask
'
,
...
...
@@ -386,6 +387,9 @@ actionRegistry.registerWorkbenchAction(new SyncActionDescriptor(DeleteWordRightT
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
Delete
,
mac
:
{
primary
:
KeyMod
.
Alt
|
KeyCode
.
Delete
}
},
KEYBINDING_CONTEXT_TERMINAL_FOCUS
),
'
Terminal: Delete Word Right
'
,
category
);
actionRegistry
.
registerWorkbenchAction
(
new
SyncActionDescriptor
(
EnterLineNavigationModeTerminalAction
,
EnterLineNavigationModeTerminalAction
.
ID
,
EnterLineNavigationModeTerminalAction
.
LABEL
,
{
primary
:
KeyMod
.
CtrlCmd
|
KeyCode
.
KEY_L
},
KEYBINDING_CONTEXT_TERMINAL_FOCUS
),
'
Terminal: Enter Line Navigation Mode
'
,
category
);
terminalCommands
.
setup
();
...
...
src/vs/workbench/parts/terminal/electron-browser/terminalActions.ts
浏览文件 @
01be0003
...
...
@@ -196,6 +196,27 @@ export class DeleteWordRightTerminalAction extends Action {
}
}
export
class
EnterLineNavigationModeTerminalAction
extends
Action
{
public
static
readonly
ID
=
'
workbench.action.terminal.enterLineNavigationMode
'
;
public
static
readonly
LABEL
=
nls
.
localize
(
'
workbench.action.terminal.enterLineNavigationMode
'
,
"
Enter Line Navigation Mode
"
);
constructor
(
id
:
string
,
label
:
string
,
@
ITerminalService
private
terminalService
:
ITerminalService
)
{
super
(
id
,
label
);
}
public
run
(
event
?:
any
):
TPromise
<
any
>
{
let
terminalInstance
=
this
.
terminalService
.
getActiveInstance
();
if
(
terminalInstance
)
{
terminalInstance
.
enterNavigationMode
();
}
return
TPromise
.
as
(
void
0
);
}
}
export
class
CreateNewTerminalAction
extends
Action
{
public
static
readonly
ID
=
'
workbench.action.terminal.new
'
;
...
...
src/vs/workbench/parts/terminal/electron-browser/terminalInstance.ts
浏览文件 @
01be0003
...
...
@@ -1123,6 +1123,15 @@ export class TerminalInstance implements ITerminalInstance {
private
_updateTheme
(
theme
?:
ITheme
):
void
{
this
.
_xterm
.
setOption
(
'
theme
'
,
this
.
_getXtermTheme
(
theme
));
}
public
enterNavigationMode
():
void
{
// Perform this asynchronously as entering navigation mode will override
// the key event handlers which seemed to mess with the keybindings
// system
setTimeout
(()
=>
{
this
.
_xterm
.
enterNavigationMode
();
},
100
);
}
}
registerThemingParticipant
((
theme
:
ITheme
,
collector
:
ICssStyleCollector
)
=>
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录