Relabel all tabs and clear labels for tabs with no key equivalent

This commit is contained in:
Justin Su
2024-07-20 23:48:30 -04:00
parent 7919cb266e
commit 823e073795

View File

@ -130,11 +130,18 @@ class TerminalController: NSWindowController, NSWindowDelegate,
// otherwise the accessory view doesn't matter. // otherwise the accessory view doesn't matter.
tabListenForFrame = windows.count > 1 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)" let action = "goto_tab:\(index + 1)"
if let equiv = ghostty.config.keyEquivalent(for: action) { if let equiv = ghostty.config.keyEquivalent(for: action) {
window.keyEquivalent = "\(equiv)" window.keyEquivalent = "\(equiv)"
} else {
window.keyEquivalent = ""
} }
} }
} }