Browse Source

fix(app): terminal PTY buffer carryover

Adam 2 weeks ago
parent
commit
8c5ba8aeb0
1 changed files with 6 additions and 0 deletions
  1. 6 0
      packages/app/src/context/terminal.tsx

+ 6 - 0
packages/app/src/context/terminal.tsx

@@ -196,6 +196,12 @@ function createWorkspaceTerminalSession(sdk: ReturnType<typeof useSDK>, dir: str
           id: clone.data.id,
           title: clone.data.title ?? pty.title,
           titleNumber: pty.titleNumber,
+          // New PTY process, so start clean.
+          buffer: undefined,
+          cursor: undefined,
+          scrollY: undefined,
+          rows: undefined,
+          cols: undefined,
         })
         if (active) {
           setStore("active", clone.data.id)