From aa5970b12d8c328fb1d83d4db2d0024f6e9d8611 Mon Sep 17 00:00:00 2001 From: Qiming-Liu Date: Sat, 2 Jul 2022 17:19:43 +0930 Subject: [PATCH] feat: tab context menu 'Restart' --- tabby-core/src/tabContextMenu.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tabby-core/src/tabContextMenu.ts b/tabby-core/src/tabContextMenu.ts index d45b65e0..3572239a 100644 --- a/tabby-core/src/tabContextMenu.ts +++ b/tabby-core/src/tabContextMenu.ts @@ -120,6 +120,17 @@ export class CommonOptionsContextMenu extends TabContextMenuItemProvider { label: this.translate.instant('Duplicate'), click: () => this.app.duplicateTab(tab), }, + { + label: this.translate.instant('Restart'), + click: () => { + this.app.duplicateTab(tab) + if (this.app.tabs.includes(tab)) { + this.app.closeTab(tab, true) + } else { + tab.destroy() + } + }, + }, { label: this.translate.instant('Color'), sublabel: currentColor ? this.translate.instant(currentColor) : undefined,