From f073a691fcd96c1bcf071febe1d38f3ba805da86 Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Tue, 8 Mar 2022 21:12:12 +0100 Subject: [PATCH] ssh: fixed newlines in banners/MOTD - fixes #5905 --- tabby-ssh/src/components/sshTab.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tabby-ssh/src/components/sshTab.component.ts b/tabby-ssh/src/components/sshTab.component.ts index 8bc0eaba..36e4d911 100644 --- a/tabby-ssh/src/components/sshTab.component.ts +++ b/tabby-ssh/src/components/sshTab.component.ts @@ -124,6 +124,7 @@ export class SSHTabComponent extends BaseTerminalTabComponent { } this.attachSessionHandler(session.serviceMessage$, msg => { + msg = msg.replace(/\n/g, '\r\n ') this.write(`\r${colors.black.bgWhite(' SSH ')} ${msg}\r\n`) }) @@ -202,6 +203,7 @@ export class SSHTabComponent extends BaseTerminalTabComponent { const session = new SSHShellSession(this.injector, this.sshSession) this.setSession(session) this.attachSessionHandler(session.serviceMessage$, msg => { + msg = msg.replace(/\n/g, '\r\n ') this.write(`\r${colors.black.bgWhite(' SSH ')} ${msg}\r\n`) session.resize(this.size.columns, this.size.rows) })