From a67a679689f5ef234163d1b42e5ca3b0f1287e40 Mon Sep 17 00:00:00 2001 From: Miroslav Djukic Date: Mon, 4 Mar 2024 09:52:55 +0100 Subject: [PATCH] Update scroll offset when terminal view resizes --- Sources/SwiftTerm/Apple/AppleTerminalView.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Sources/SwiftTerm/Apple/AppleTerminalView.swift b/Sources/SwiftTerm/Apple/AppleTerminalView.swift index 492d356c..098c05e5 100644 --- a/Sources/SwiftTerm/Apple/AppleTerminalView.swift +++ b/Sources/SwiftTerm/Apple/AppleTerminalView.swift @@ -131,6 +131,8 @@ extension TerminalView { search.invalidate () terminalDelegate?.sizeChanged (source: self, newCols: newCols, newRows: newRows) + + updateScroller() return true } return false @@ -545,7 +547,6 @@ extension TerminalView { func calcLineOffset (forRow: Int) -> CGFloat { cellDimension.height * CGFloat (forRow-bufferOffset+1) } - // draw lines #if os(iOS) || os(visionOS) // On iOS, we are drawing the exposed region