Fix tab name calculation to account for pinned tabs (#1385)

This commit is contained in:
Evan Simkowitz 2024-12-04 17:00:19 -05:00 committed by GitHub
parent d8edea9fbc
commit 3945995d73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ func CreateTab(ctx context.Context, workspaceId string, tabName string, activate
if err != nil { if err != nil {
return "", fmt.Errorf("workspace %s not found: %w", workspaceId, err) return "", fmt.Errorf("workspace %s not found: %w", workspaceId, err)
} }
tabName = "T" + fmt.Sprint(len(ws.TabIds)+1) tabName = "T" + fmt.Sprint(len(ws.TabIds)+len(ws.PinnedTabIds)+1)
} }
tab, err := createTabObj(ctx, workspaceId, tabName, pinned) tab, err := createTabObj(ctx, workspaceId, tabName, pinned)
if err != nil { if err != nil {