From 823e07379521a799e4f260be0796857ddd4b07c7 Mon Sep 17 00:00:00 2001 From: Justin Su Date: Sat, 20 Jul 2024 23:48:30 -0400 Subject: [PATCH] Relabel all tabs and clear labels for tabs with no key equivalent --- macos/Sources/Features/Terminal/TerminalController.swift | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/macos/Sources/Features/Terminal/TerminalController.swift b/macos/Sources/Features/Terminal/TerminalController.swift index 0ac42d109..85681bfc6 100644 --- a/macos/Sources/Features/Terminal/TerminalController.swift +++ b/macos/Sources/Features/Terminal/TerminalController.swift @@ -130,11 +130,18 @@ class TerminalController: NSWindowController, NSWindowDelegate, // otherwise the accessory view doesn't matter. tabListenForFrame = windows.count > 1 - for (index, window) in windows.enumerated().prefix(9) { + for (index, window) in windows.enumerated() { + guard index < 9 else { + window.keyEquivalent = "" + continue + } + let action = "goto_tab:\(index + 1)" if let equiv = ghostty.config.keyEquivalent(for: action) { window.keyEquivalent = "\(equiv)" + } else { + window.keyEquivalent = "" } } }