mirror of
https://github.com/Eugeny/tabby.git
synced 2025-07-25 19:28:33 +00:00
fixed incorrect passthrough handling in zmodem
This commit is contained in:
@@ -26,9 +26,10 @@ export class ZModemDecorator extends TerminalDecorator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
attach (terminal: BaseTerminalTabComponent): void {
|
attach (terminal: BaseTerminalTabComponent): void {
|
||||||
|
let isActive = false
|
||||||
const sentry = new ZModem.Sentry({
|
const sentry = new ZModem.Sentry({
|
||||||
to_terminal: data => {
|
to_terminal: data => {
|
||||||
if (!terminal.enablePassthrough) {
|
if (isActive) {
|
||||||
terminal.write(data)
|
terminal.write(data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -36,9 +37,11 @@ export class ZModemDecorator extends TerminalDecorator {
|
|||||||
on_detect: async detection => {
|
on_detect: async detection => {
|
||||||
try {
|
try {
|
||||||
terminal.enablePassthrough = false
|
terminal.enablePassthrough = false
|
||||||
|
isActive = true
|
||||||
await this.process(terminal, detection)
|
await this.process(terminal, detection)
|
||||||
} finally {
|
} finally {
|
||||||
terminal.enablePassthrough = true
|
terminal.enablePassthrough = true
|
||||||
|
isActive = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
on_retract: () => {
|
on_retract: () => {
|
||||||
|
Reference in New Issue
Block a user