From 780691413d6ec0fa82c591e51c2355d89d33e7dc Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Sat, 19 Mar 2022 13:42:27 +0100 Subject: [PATCH] fixed incorrect passthrough handling in zmodem --- tabby-terminal/src/features/zmodem.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tabby-terminal/src/features/zmodem.ts b/tabby-terminal/src/features/zmodem.ts index cd5d660b..3b9ca5ba 100644 --- a/tabby-terminal/src/features/zmodem.ts +++ b/tabby-terminal/src/features/zmodem.ts @@ -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: () => {