mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-10-09 15:58:34 +00:00
14fe1e3ecb
Fixes #1375 by letting Cmd/Ctrl+[1...9] target only work tabs when enabled, while keeping the existing Terminus-style default. Co-authored-by: Cursor <cursoragent@cursor.com>
15 lines
517 B
TypeScript
15 lines
517 B
TypeScript
/** Tab ids targeted by Cmd/Ctrl+[1...9] number shortcuts. */
|
|
export function buildNumberShortcutTabTargets(params: {
|
|
showSftpTab: boolean;
|
|
shellOnlyTabNumberShortcuts: boolean;
|
|
orderedTabs: readonly string[];
|
|
editorTabIds: readonly string[];
|
|
}): string[] {
|
|
const workTabs = [...params.orderedTabs, ...params.editorTabIds];
|
|
if (params.shellOnlyTabNumberShortcuts) {
|
|
return workTabs;
|
|
}
|
|
const pinnedTabs = params.showSftpTab ? ['vault', 'sftp'] : ['vault'];
|
|
return [...pinnedTabs, ...workTabs];
|
|
}
|