mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
feat: make too big tab indices go to last tab
This commit is contained in:
@ -518,7 +518,10 @@ class TerminalController: BaseTerminalController {
|
|||||||
finalIndex = Int(tabIndex - 1)
|
finalIndex = Int(tabIndex - 1)
|
||||||
}
|
}
|
||||||
|
|
||||||
guard finalIndex >= 0 && finalIndex < tabbedWindows.count else { return }
|
guard finalIndex >= 0 else { return }
|
||||||
|
if finalIndex >= tabbedWindows.count {
|
||||||
|
finalIndex = tabbedWindows.count - 1
|
||||||
|
}
|
||||||
let targetWindow = tabbedWindows[finalIndex]
|
let targetWindow = tabbedWindows[finalIndex]
|
||||||
targetWindow.makeKeyAndOrderFront(nil)
|
targetWindow.makeKeyAndOrderFront(nil)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user