From f57f9f2ec96eadccc37f27b2793d3491be5d4473 Mon Sep 17 00:00:00 2001 From: Justin Su Date: Sun, 21 Jul 2024 03:31:33 -0400 Subject: [PATCH] Use 1-indexed values when dealing with tabs --- macos/Sources/Features/Terminal/TerminalController.swift | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index 85681bfc6..01d2f78b1 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -130,13 +130,13 @@ class TerminalController: NSWindowController, NSWindowDelegate, // otherwise the accessory view doesn't matter. tabListenForFrame = windows.count > 1 - for (index, window) in windows.enumerated() { - guard index < 9 else { + for (tab, window) in zip(1..., windows) { + guard tab <= 9 else { window.keyEquivalent = "" continue } - let action = "goto_tab:\(index + 1)" + let action = "goto_tab:\(tab)" if let equiv = ghostty.config.keyEquivalent(for: action) { window.keyEquivalent = "\(equiv)"