fix calling of scrollback restoration, its not done on init, but only if existing is being returned

This commit is contained in:
neon443
2025-07-04 16:51:02 +01:00
parent 27e75285fe
commit a495419348
2 changed files with 4 additions and 1 deletions

View File

@@ -25,7 +25,7 @@ final class SSHTerminalDelegate: TerminalView, Sendable, @preconcurrency Termina
applySelectedTheme() applySelectedTheme()
Task { Task {
await restoreScrollback() // await restoreScrollback()
await startFeedLoop() await startFeedLoop()
} }
} }

View File

@@ -19,6 +19,9 @@ struct TerminalController: UIViewRepresentable {
func makeUIView(context: Context) -> TerminalView { func makeUIView(context: Context) -> TerminalView {
if let sessionID = handler.sessionID { if let sessionID = handler.sessionID {
if let existing = container.sessions[sessionID] { if let existing = container.sessions[sessionID] {
Task {
await existing.terminalView.restoreScrollback()
}
return existing.terminalView return existing.terminalView
} }
} }