diff --git a/.DS_Store b/.DS_Store index 6f0edab..002634a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal b/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal index 54d24fc..95de1f9 100755 Binary files a/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal and b/EnhancedTerminal.app/Contents/MacOS/EnhancedTerminal differ diff --git a/MainWindowController.swift b/MainWindowController.swift index 04b9159..0e97976 100644 --- a/MainWindowController.swift +++ b/MainWindowController.swift @@ -543,10 +543,18 @@ class MainWindowController: NSWindowController { @objc func splitPaneVertically() { guard let currentSession = tabManager.getCurrentSession() else { return } + // If split view exists with wrong orientation, recreate it + if let existing = splitView, !existing.isVertical { + // Remove and recreate with correct orientation + existing.removeFromSuperview() + splitView = nil + panes = [] + } + // Create split view if it doesn't exist if splitView == nil { splitView = NSSplitView(frame: contentView.bounds) - splitView?.isVertical = true + splitView?.isVertical = true // Side-by-side (vertical divider) splitView?.dividerStyle = .thin splitView?.autoresizingMask = [.width, .height] @@ -577,10 +585,18 @@ class MainWindowController: NSWindowController { @objc func splitPaneHorizontally() { guard let currentSession = tabManager.getCurrentSession() else { return } + // If split view exists with wrong orientation, recreate it + if let existing = splitView, existing.isVertical { + // Remove and recreate with correct orientation + existing.removeFromSuperview() + splitView = nil + panes = [] + } + // Create split view if it doesn't exist if splitView == nil { splitView = NSSplitView(frame: contentView.bounds) - splitView?.isVertical = false + splitView?.isVertical = false // Top-bottom (horizontal divider) splitView?.dividerStyle = .thin splitView?.autoresizingMask = [.width, .height]