We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 769bf00 commit a846faaCopy full SHA for a846faa
src/system/-webview/vscode/tabs.ts
@@ -3,6 +3,17 @@ import { Uri, window } from 'vscode';
3
import { areUrisEqual } from '../../uri';
4
import { isTrackableUri } from './uris';
5
6
+export async function closeTab(uri: Uri, preserveFocus?: boolean): Promise<void> {
7
+ for (const group of window.tabGroups.all) {
8
+ for (const tab of group.tabs) {
9
+ if (!tabContainsUri(tab, uri)) continue;
10
+
11
+ await window.tabGroups.close(tab, preserveFocus);
12
+ return;
13
+ }
14
15
+}
16
17
export function getTabUri(tab: Tab | undefined): Uri | undefined {
18
const input = tab?.input;
19
if (input == null || typeof input !== 'object') return undefined;
0 commit comments