Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
9c77fb32
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,发现更多精彩内容 >>
未验证
提交
9c77fb32
编写于
3月 04, 2019
作者:
D
Daniel Imms
提交者:
GitHub
3月 04, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #69049 from Microsoft/tyriar/terminalPanel_snc
Fix strict null checks in terminalPanel
上级
d9aeef5d
d9ad6ae1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
16 addition
and
8 deletion
+16
-8
src/tsconfig.strictNullChecks.json
src/tsconfig.strictNullChecks.json
+1
-0
src/vs/editor/contrib/find/simpleFindWidget.ts
src/vs/editor/contrib/find/simpleFindWidget.ts
+1
-2
src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts
...kbench/contrib/terminal/electron-browser/terminalPanel.ts
+14
-6
未找到文件。
src/tsconfig.strictNullChecks.json
浏览文件 @
9c77fb32
...
...
@@ -283,6 +283,7 @@
"./vs/workbench/contrib/terminal/electron-browser/terminalConfigHelper.ts"
,
"./vs/workbench/contrib/terminal/electron-browser/terminalInstance.ts"
,
"./vs/workbench/contrib/terminal/electron-browser/terminalLinkHandler.ts"
,
"./vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts"
,
"./vs/workbench/contrib/terminal/electron-browser/terminalProcessManager.ts"
,
"./vs/workbench/contrib/terminal/node/terminal.ts"
,
"./vs/workbench/contrib/terminal/node/terminalCommandTracker.ts"
,
...
...
src/vs/editor/contrib/find/simpleFindWidget.ts
浏览文件 @
9c77fb32
...
...
@@ -26,7 +26,7 @@ const NLS_CLOSE_BTN_LABEL = nls.localize('label.closeButton', "Close");
export
abstract
class
SimpleFindWidget
extends
Widget
{
private
_findInput
:
FindInput
;
private
_domNode
?
:
HTMLElement
;
private
_domNode
:
HTMLElement
;
private
_innerDomNode
:
HTMLElement
;
private
_isVisible
:
boolean
=
false
;
private
_focusTracker
:
dom
.
IFocusTracker
;
...
...
@@ -182,7 +182,6 @@ export abstract class SimpleFindWidget extends Widget {
if
(
this
.
_domNode
&&
this
.
_domNode
.
parentElement
)
{
this
.
_domNode
.
parentElement
.
removeChild
(
this
.
_domNode
);
this
.
_domNode
=
undefined
;
}
}
...
...
src/vs/workbench/contrib/terminal/electron-browser/terminalPanel.ts
浏览文件 @
9c77fb32
...
...
@@ -165,7 +165,7 @@ export class TerminalPanel extends Panel {
return
this
.
_contextMenuActions
;
}
public
getActionItem
(
action
:
Action
):
IActionItem
{
public
getActionItem
(
action
:
Action
):
IActionItem
|
null
{
if
(
action
.
id
===
SwitchTerminalAction
.
ID
)
{
return
this
.
_instantiationService
.
createInstance
(
SwitchTerminalActionItem
,
action
);
}
...
...
@@ -182,7 +182,7 @@ export class TerminalPanel extends Panel {
public
focusFindWidget
()
{
const
activeInstance
=
this
.
_terminalService
.
getActiveInstance
();
if
(
activeInstance
&&
activeInstance
.
hasSelection
()
&&
(
activeInstance
.
selection
.
indexOf
(
'
\n
'
)
===
-
1
)
)
{
if
(
activeInstance
&&
activeInstance
.
hasSelection
()
&&
activeInstance
.
selection
!
.
indexOf
(
'
\n
'
)
===
-
1
)
{
this
.
_findWidget
.
reveal
(
activeInstance
.
selection
);
}
else
{
this
.
_findWidget
.
reveal
();
...
...
@@ -195,7 +195,7 @@ export class TerminalPanel extends Panel {
public
showFindWidget
()
{
const
activeInstance
=
this
.
_terminalService
.
getActiveInstance
();
if
(
activeInstance
&&
activeInstance
.
hasSelection
()
&&
(
activeInstance
.
selection
.
indexOf
(
'
\n
'
)
===
-
1
)
)
{
if
(
activeInstance
&&
activeInstance
.
hasSelection
()
&&
activeInstance
.
selection
!
.
indexOf
(
'
\n
'
)
===
-
1
)
{
this
.
_findWidget
.
show
(
activeInstance
.
selection
);
}
else
{
this
.
_findWidget
.
show
();
...
...
@@ -215,10 +215,16 @@ export class TerminalPanel extends Panel {
if
(
event
.
which
===
2
&&
platform
.
isLinux
)
{
// Drop selection and focus terminal on Linux to enable middle button paste when click
// occurs on the selection itself.
this
.
_terminalService
.
getActiveInstance
().
focus
();
const
terminal
=
this
.
_terminalService
.
getActiveInstance
();
if
(
terminal
)
{
terminal
.
focus
();
}
}
else
if
(
event
.
which
===
3
)
{
if
(
this
.
_terminalService
.
configHelper
.
config
.
rightClickBehavior
===
'
copyPaste
'
)
{
const
terminal
=
this
.
_terminalService
.
getActiveInstance
();
if
(
!
terminal
)
{
return
;
}
if
(
terminal
.
hasSelection
())
{
terminal
.
copySelection
();
terminal
.
clearSelection
();
...
...
@@ -246,7 +252,7 @@ export class TerminalPanel extends Panel {
if
(
event
.
which
===
1
)
{
const
terminal
=
this
.
_terminalService
.
getActiveInstance
();
if
(
terminal
.
hasSelection
())
{
if
(
terminal
&&
terminal
.
hasSelection
())
{
terminal
.
copySelection
();
}
}
...
...
@@ -299,7 +305,9 @@ export class TerminalPanel extends Panel {
}
const
terminal
=
this
.
_terminalService
.
getActiveInstance
();
terminal
.
sendText
(
terminalEnvironment
.
preparePathForTerminal
(
path
),
false
);
if
(
terminal
)
{
terminal
.
sendText
(
terminalEnvironment
.
preparePathForTerminal
(
path
),
false
);
}
}
}));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录