mirror of
https://github.com/Microsoft/vscode
synced 2024-10-30 01:37:20 +00:00
fixes #20700
This commit is contained in:
parent
c6fecc0dc4
commit
79966a87c6
1 changed files with 6 additions and 4 deletions
|
@ -53,11 +53,13 @@ export function fillInActions(menu: IMenu, context: any, target: IAction[] | { p
|
|||
head.splice(sep, 0, ...actions.slice(pivot));
|
||||
|
||||
} else {
|
||||
if (Array.isArray<IAction>(target)) {
|
||||
target.push(new Separator(), ...actions);
|
||||
} else {
|
||||
target.secondary.push(new Separator(), ...actions);
|
||||
const to = Array.isArray<IAction>(target) ? target : target.secondary;
|
||||
|
||||
if (to.length > 0) {
|
||||
to.push(new Separator());
|
||||
}
|
||||
|
||||
to.push(...actions);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue