Skip to content

Commit cc434a9

Browse files
authored
Git - do not add a separate after the last command group (microsoft#153649)
Fix microsoft#153501
1 parent 6670977 commit cc434a9

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/vs/workbench/contrib/scm/browser/scmViewPane.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2629,11 +2629,13 @@ export class SCMActionButton implements IDisposable {
26292629

26302630
if (button.secondaryCommands?.length) {
26312631
const actions: IAction[] = [];
2632-
for (const commandGroup of button.secondaryCommands) {
2633-
for (const command of commandGroup) {
2632+
for (let index = 0; index < button.secondaryCommands.length; index++) {
2633+
for (const command of button.secondaryCommands[index]) {
26342634
actions.push(new Action(command.id, command.title, undefined, true, async () => await executeButtonAction(command.id, ...(command.arguments || []))));
26352635
}
2636-
actions.push(new Separator());
2636+
if (index !== button.secondaryCommands.length - 1) {
2637+
actions.push(new Separator());
2638+
}
26372639
}
26382640

26392641
// ButtonWithDropdown

0 commit comments

Comments
 (0)