Browse Source

Updates set views layout command

main
Eric Amodio 4 years ago
parent
commit
ccdd2a6dbe
1 changed files with 9 additions and 2 deletions
  1. +9
    -2
      src/commands/setViewsLayout.ts

+ 9
- 2
src/commands/setViewsLayout.ts View File

@ -60,8 +60,15 @@ export class SetViewsLayoutCommand extends Command {
break;
case ViewsLayout.SourceControl:
for (const view of viewsConfigKeys) {
void (await commands.executeCommand(`${extensionId}.views.${view}.resetViewLocation`));
try {
void (await commands.executeCommand(
'workbench.action.moveViews',
viewsConfigKeys.map(view => `${extensionId}.views.${view}`, 'workbench.view.scm'),
));
} catch {
for (const view of viewsConfigKeys) {
void (await commands.executeCommand(`${extensionId}.views.${view}.resetViewLocation`));
}
}
break;

Loading…
Cancel
Save