Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
后端镜像
Tabby
提交
433c7d33
T
Tabby
项目概览
后端镜像
/
Tabby
通知
26
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Tabby
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
未验证
提交
433c7d33
编写于
12月 08, 2021
作者:
E
Eugene Pankov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed tab title recovery for split tabs - fixes #4810
上级
b755346a
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
18 addition
and
18 deletion
+18
-18
app/lib/pty.ts
app/lib/pty.ts
+6
-2
tabby-core/src/components/appRoot.component.ts
tabby-core/src/components/appRoot.component.ts
+3
-3
tabby-core/src/components/splitTab.component.ts
tabby-core/src/components/splitTab.component.ts
+1
-0
tabby-core/src/services/app.service.ts
tabby-core/src/services/app.service.ts
+4
-7
tabby-local/src/session.ts
tabby-local/src/session.ts
+4
-6
未找到文件。
app/lib/pty.ts
浏览文件 @
433c7d33
...
...
@@ -90,6 +90,7 @@ class PTYDataQueue {
export
class
PTY
{
private
pty
:
nodePTY
.
IPty
private
outputQueue
:
PTYDataQueue
exited
=
false
constructor
(
private
id
:
string
,
private
app
:
Application
,
...
args
:
any
[])
{
this
.
pty
=
(
nodePTY
as
any
).
spawn
(...
args
)
...
...
@@ -101,7 +102,10 @@ export class PTY {
setImmediate
(()
=>
this
.
emit
(
'
data
'
,
data
))
})
this
.
pty
.
on
(
'
data
'
,
data
=>
this
.
outputQueue
.
push
(
Buffer
.
from
(
data
)))
this
.
pty
.
onData
(
data
=>
this
.
outputQueue
.
push
(
Buffer
.
from
(
data
)))
this
.
pty
.
onExit
(()
=>
{
this
.
exited
=
true
})
}
getPID
():
number
{
...
...
@@ -144,7 +148,7 @@ export class PTYManager {
})
ipcMain
.
on
(
'
pty:exists
'
,
(
event
,
id
)
=>
{
event
.
returnValue
=
!
!
this
.
ptys
[
id
]
event
.
returnValue
=
!
this
.
ptys
[
id
]?.
exited
})
ipcMain
.
on
(
'
pty:get-pid
'
,
(
event
,
id
)
=>
{
...
...
tabby-core/src/components/appRoot.component.ts
浏览文件 @
433c7d33
...
...
@@ -108,13 +108,13 @@ export class AppRootComponent {
if
(
hotkey
===
'
move-tab-right
'
)
{
this
.
app
.
moveSelectedTabRight
()
}
if
(
hotkey
===
'
reopen-tab
'
)
{
this
.
app
.
reopenLastTab
()
}
if
(
hotkey
===
'
duplicate-tab
'
)
{
this
.
app
.
duplicateTab
(
this
.
app
.
activeTab
)
}
}
if
(
hotkey
===
'
reopen-tab
'
)
{
this
.
app
.
reopenLastTab
()
}
if
(
hotkey
===
'
toggle-fullscreen
'
)
{
hostWindow
.
toggleFullscreen
()
}
...
...
tabby-core/src/components/splitTab.component.ts
浏览文件 @
433c7d33
...
...
@@ -306,6 +306,7 @@ export class SplitTabComponent extends BaseTabComponent implements AfterViewInit
async
ngAfterViewInit
():
Promise
<
void
>
{
if
(
this
.
_recoveredState
)
{
await
this
.
recoverContainer
(
this
.
root
,
this
.
_recoveredState
,
this
.
_recoveredState
.
duplicate
)
this
.
updateTitle
()
this
.
layout
()
setTimeout
(()
=>
{
if
(
this
.
hasFocus
)
{
...
...
tabby-core/src/services/app.service.ts
浏览文件 @
433c7d33
...
...
@@ -102,13 +102,6 @@ export class AppService {
})
hostWindow
.
windowFocused$
.
subscribe
(()
=>
this
.
_activeTab
?.
emitFocused
())
this
.
tabClosed$
.
subscribe
(
async
tab
=>
{
const
token
=
await
tabRecovery
.
getFullRecoveryToken
(
tab
)
if
(
token
)
{
this
.
closedTabsStack
.
push
(
token
)
}
})
}
addTabRaw
(
tab
:
BaseTabComponent
,
index
:
number
|
null
=
null
):
void
{
...
...
@@ -317,6 +310,10 @@ export class AppService {
if
(
checkCanClose
&&
!
await
tab
.
canClose
())
{
return
}
const
token
=
await
this
.
tabRecovery
.
getFullRecoveryToken
(
tab
)
if
(
token
)
{
this
.
closedTabsStack
.
push
(
token
)
}
tab
.
destroy
()
}
...
...
tabby-local/src/session.ts
浏览文件 @
433c7d33
...
...
@@ -295,18 +295,16 @@ export class Session extends BaseSession {
}
else
{
await
new
Promise
<
void
>
((
resolve
)
=>
{
this
.
kill
(
'
SIGTERM
'
)
set
Immediate
(()
=>
{
set
Timeout
(()
=>
{
try
{
process
.
kill
(
this
.
pty
!
.
getPID
(),
0
)
// still alive
setTimeout
(()
=>
{
this
.
kill
(
'
SIGKILL
'
)
resolve
()
},
1000
)
this
.
kill
(
'
SIGKILL
'
)
resolve
()
}
catch
{
resolve
()
}
})
}
,
500
)
})
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录