mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-08-02 14:57:31 +03:00
Add context menu for quick terminal tabs
This commit is contained in:
@ -14,6 +14,18 @@ struct QuickTerminalTabBarView: View {
|
||||
onSelect: { tabManager.selectTab(tab) },
|
||||
onClose: { tabManager.closeTab(tab) }
|
||||
)
|
||||
.contextMenu {
|
||||
Button("Close Tab") {
|
||||
tabManager.closeTab(tab)
|
||||
}
|
||||
Button("Close Other Tabs") {
|
||||
tabManager.tabs.forEach { otherTab in
|
||||
if otherTab.id != tab.id {
|
||||
tabManager.closeTab(otherTab)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.onDrag {
|
||||
tabManager.draggedTab = tab
|
||||
return NSItemProvider(object: tab.id.uuidString as NSString)
|
||||
|
Reference in New Issue
Block a user