Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
vscode
提交
b0d128da
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,体验更适合开发者的 AI 搜索 >>
提交
b0d128da
编写于
12月 18, 2020
作者:
M
meganrogge
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
only call buffer once and store it on xterm creation
上级
fc35c427
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
7 addition
and
5 deletion
+7
-5
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
...vs/workbench/contrib/terminal/browser/terminalInstance.ts
+7
-5
未找到文件。
src/vs/workbench/contrib/terminal/browser/terminalInstance.ts
浏览文件 @
b0d128da
...
...
@@ -32,7 +32,7 @@ import { TerminalLinkManager } from 'vs/workbench/contrib/terminal/browser/links
import
{
IAccessibilityService
}
from
'
vs/platform/accessibility/common/accessibility
'
;
import
{
ITerminalInstanceService
,
ITerminalInstance
,
TerminalShellType
,
WindowsShellType
,
ITerminalExternalLinkProvider
}
from
'
vs/workbench/contrib/terminal/browser/terminal
'
;
import
{
TerminalProcessManager
}
from
'
vs/workbench/contrib/terminal/browser/terminalProcessManager
'
;
import
type
{
Terminal
as
XTermTerminal
,
IBuffer
,
ITerminalAddon
}
from
'
xterm
'
;
import
type
{
Terminal
as
XTermTerminal
,
IBuffer
,
ITerminalAddon
,
IBufferNamespace
}
from
'
xterm
'
;
import
type
{
SearchAddon
,
ISearchOptions
}
from
'
xterm-addon-search
'
;
import
type
{
Unicode11Addon
}
from
'
xterm-addon-unicode11
'
;
import
type
{
WebglAddon
}
from
'
xterm-addon-webgl
'
;
...
...
@@ -88,6 +88,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
private
_title
:
string
=
''
;
private
_wrapperElement
:
(
HTMLElement
&
{
xterm
?:
XTermTerminal
})
|
undefined
;
private
_xterm
:
XTermTerminal
|
undefined
;
private
_xtermBuffer
:
IBufferNamespace
|
undefined
;
private
_xtermCore
:
XTermCore
|
undefined
;
private
_xtermSearch
:
SearchAddon
|
undefined
;
private
_xtermUnicode11
:
Unicode11Addon
|
undefined
;
...
...
@@ -416,6 +417,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
wordSeparator
:
config
.
wordSeparators
});
this
.
_xterm
=
xterm
;
this
.
_xtermBuffer
=
xterm
.
buffer
;
this
.
_xtermCore
=
(
xterm
as
any
).
_core
as
XTermCore
;
this
.
_updateUnicodeVersion
();
this
.
updateAccessibilitySupport
();
...
...
@@ -800,7 +802,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
}
if
(
this
.
_xterm
)
{
const
buffer
=
this
.
_xterm
.
buffer
;
const
buffer
=
this
.
_xterm
Buffer
!
;
this
.
_sendLineData
(
buffer
.
active
,
buffer
.
active
.
baseY
+
buffer
.
active
.
cursorY
);
this
.
_xterm
.
dispose
();
}
...
...
@@ -881,7 +883,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
// change since the number of visible rows decreases.
// This can likely be removed after https://github.com/xtermjs/xterm.js/issues/291 is
// fixed upstream.
this
.
_xtermCore
.
_onScroll
.
fire
(
this
.
_xterm
.
buffer
.
active
.
viewportY
);
this
.
_xtermCore
.
_onScroll
.
fire
(
this
.
_xterm
Buffer
!
.
active
.
viewportY
);
if
(
this
.
_container
&&
this
.
_container
.
parentElement
)
{
// Force a layout when the instance becomes invisible. This is particularly important
// for ensuring that terminals that are created in the background by an extension will
...
...
@@ -1216,7 +1218,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
private
_onLineFeed
():
void
{
const
buffer
=
this
.
_xterm
!
.
buffer
;
const
buffer
=
this
.
_xterm
Buffer
!
;
const
newLine
=
buffer
.
active
.
getLine
(
buffer
.
active
.
baseY
+
buffer
.
active
.
cursorY
);
if
(
newLine
&&
!
newLine
.
isWrapped
)
{
this
.
_sendLineData
(
buffer
.
active
,
buffer
.
active
.
baseY
+
buffer
.
active
.
cursorY
-
1
);
...
...
@@ -1224,7 +1226,7 @@ export class TerminalInstance extends Disposable implements ITerminalInstance {
}
private
_onCursorMove
():
void
{
const
buffer
=
this
.
_xterm
!
.
buffer
;
const
buffer
=
this
.
_xterm
Buffer
!
;
this
.
_sendLineData
(
buffer
.
active
,
buffer
.
active
.
baseY
+
buffer
.
active
.
cursorY
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录