From bc0d1a9255332622243f6e5af5495fae16a43c50 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 6 Nov 2023 09:11:50 -0800 Subject: [PATCH] macos: remove focused cell size resize increment setter --- .../Sources/Ghostty/Ghostty.TerminalSplit.swift | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift b/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift index 4e4b3d39c..65fabf939 100644 --- a/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift +++ b/macos/Sources/Ghostty/Ghostty.TerminalSplit.swift @@ -267,19 +267,10 @@ extension Ghostty { @Binding var node: SplitNode? @StateObject var container: SplitNode.Container - @EnvironmentObject private var ghostty: Ghostty.AppState - - /// The cell size of the currently focused view. We use this to - /// (optionally) set the resizeIncrements binding for the SplitView - @FocusedValue(\.ghosttySurfaceCellSize) private var focusedCellSize - - /// Resize increments used by the split view - @State private var resizeIncrements: NSSize = .init(width: 1.0, height: 1.0) - var body: some View { SplitView( container.direction, - resizeIncrements: resizeIncrements, + resizeIncrements: .init(width: 1, height: 1), resizePublisher: container.resizeEvent, left: { let neighborKey: WritableKeyPath = container.direction == .horizontal ? \.right : \.bottom @@ -302,11 +293,6 @@ extension Ghostty { ]) ) }) - .onChange(of: focusedCellSize) { newValue in - guard let increments = newValue else { return } - guard ghostty.windowStepResize else { return } - self.resizeIncrements = increments - } } private func closeableTopLeft() -> Binding {