From 2faa0c9bee71edf4b6eb6de65affb44be372fbde Mon Sep 17 00:00:00 2001 From: cryptocode Date: Fri, 10 May 2024 11:17:11 +0200 Subject: [PATCH 1/2] Rename Split Horizontally/Vertically to Split Right/Down I make the following suggestion through a PR since I already tried this locally and have a branch ready: - Rename Split Horizontally to Split Right - Rename Split Vertically to Split Down Rationale: The terms horizontal and vertical are ambiguous in the context of splitting (does it mean the splitter is vertical, or are the panes organized vertically?) Different apps pick different interpretations, so people get confused. IntelliJ made the same change as above based on user feedback: https://youtrack.jetbrains.com/issue/IJPL-130991/Split-Vertically-and-Split-Horizontally-are-ambiguous-and-should-be-renamed Ghostty is using the left/right nomenclature in other menu items. In the codebase, SplitDirection is already left/right. --- macos/Sources/App/macOS/MainMenu.xib | 8 ++++---- macos/Sources/Features/Terminal/TerminalController.swift | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/macos/Sources/App/macOS/MainMenu.xib b/macos/Sources/App/macOS/MainMenu.xib index cd627f762..1857fe75d 100644 --- a/macos/Sources/App/macOS/MainMenu.xib +++ b/macos/Sources/App/macOS/MainMenu.xib @@ -126,16 +126,16 @@ - + - + - + - + diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index cea140995..84b8ad01c 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -461,12 +461,12 @@ class TerminalController: NSWindowController, NSWindowDelegate, }) } - @IBAction func splitHorizontally(_ sender: Any) { + @IBAction func splitRight(_ sender: Any) { guard let surface = focusedSurface?.surface else { return } ghostty.split(surface: surface, direction: GHOSTTY_SPLIT_RIGHT) } - @IBAction func splitVertically(_ sender: Any) { + @IBAction func splitDown(_ sender: Any) { guard let surface = focusedSurface?.surface else { return } ghostty.split(surface: surface, direction: GHOSTTY_SPLIT_DOWN) } From a304c953bf2ddae90e89dca035f3d284c8424bb6 Mon Sep 17 00:00:00 2001 From: cryptocode Date: Fri, 10 May 2024 12:08:19 +0200 Subject: [PATCH 2/2] Rename menu item variable name accordingly --- macos/Sources/App/macOS/AppDelegate.swift | 8 ++++---- macos/Sources/App/macOS/MainMenu.xib | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/macos/Sources/App/macOS/AppDelegate.swift b/macos/Sources/App/macOS/AppDelegate.swift index 34b4ba2b8..7a11e6ac1 100644 --- a/macos/Sources/App/macOS/AppDelegate.swift +++ b/macos/Sources/App/macOS/AppDelegate.swift @@ -26,8 +26,8 @@ class AppDelegate: NSObject, @IBOutlet private var menuNewWindow: NSMenuItem? @IBOutlet private var menuNewTab: NSMenuItem? - @IBOutlet private var menuSplitHorizontal: NSMenuItem? - @IBOutlet private var menuSplitVertical: NSMenuItem? + @IBOutlet private var menuSplitRight: NSMenuItem? + @IBOutlet private var menuSplitDown: NSMenuItem? @IBOutlet private var menuClose: NSMenuItem? @IBOutlet private var menuCloseWindow: NSMenuItem? @IBOutlet private var menuCloseAllWindows: NSMenuItem? @@ -257,8 +257,8 @@ class AppDelegate: NSObject, syncMenuShortcut(action: "close_surface", menuItem: self.menuClose) syncMenuShortcut(action: "close_window", menuItem: self.menuCloseWindow) syncMenuShortcut(action: "close_all_windows", menuItem: self.menuCloseAllWindows) - syncMenuShortcut(action: "new_split:right", menuItem: self.menuSplitHorizontal) - syncMenuShortcut(action: "new_split:down", menuItem: self.menuSplitVertical) + syncMenuShortcut(action: "new_split:right", menuItem: self.menuSplitRight) + syncMenuShortcut(action: "new_split:down", menuItem: self.menuSplitDown) syncMenuShortcut(action: "copy_to_clipboard", menuItem: self.menuCopy) syncMenuShortcut(action: "paste_from_clipboard", menuItem: self.menuPaste) diff --git a/macos/Sources/App/macOS/MainMenu.xib b/macos/Sources/App/macOS/MainMenu.xib index 1857fe75d..bbfd59eae 100644 --- a/macos/Sources/App/macOS/MainMenu.xib +++ b/macos/Sources/App/macOS/MainMenu.xib @@ -41,8 +41,8 @@ - - + +