Skip to content

Reveal not visible text editor #2758

Discussion options

You must be logged in to vote

I used this on my Bookmarks extension recently, to open the file in its original group/column.

function findTabGroupColumn(uri: Uri, column: ViewColumn): ViewColumn {
        if (vscode.window.tabGroups.all.length === 1) {
            return column;
        }

        for (const tab of vscode.window.tabGroups.activeTabGroup.tabs) {
            if (isTabOfUri(tab, uri)) {
                return tab.group.viewColumn;
            }
        }

        for (const tabGroup of vscode.window.tabGroups.all) {
            if (tabGroup.viewColumn === column) 
                continue;
            
            for (const tab of tabGroup.tabs) {
                if (isTabOfUri(tab, uri)) {

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@Bertik23
Comment options

@alefragnani
Comment options

@alefragnani
Comment options

Answer selected by Bertik23
@Bertik23
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants