1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-11-24 06:04:04 +03:00

fixed incorrect passthrough handling in zmodem

This commit is contained in:
Eugene Pankov 2022-03-19 13:42:27 +01:00
parent 45b6e21dbc
commit 780691413d
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4

View File

@ -26,9 +26,10 @@ export class ZModemDecorator extends TerminalDecorator {
}
attach (terminal: BaseTerminalTabComponent): void {
let isActive = false
const sentry = new ZModem.Sentry({
to_terminal: data => {
if (!terminal.enablePassthrough) {
if (isActive) {
terminal.write(data)
}
},
@ -36,9 +37,11 @@ export class ZModemDecorator extends TerminalDecorator {
on_detect: async detection => {
try {
terminal.enablePassthrough = false
isActive = true
await this.process(terminal, detection)
} finally {
terminal.enablePassthrough = true
isActive = false
}
},
on_retract: () => {