Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix terminal location comparison #134755

Merged
merged 1 commit into from Oct 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/vs/workbench/contrib/terminal/browser/terminalMenus.ts
Expand Up @@ -688,6 +688,7 @@ export function getTerminalActionBarArgs(location: ITerminalLocationOptions, pro
let dropdownActions: IAction[] = [];
let submenuActions: IAction[] = [];

const splitLocation = (location === TerminalLocation.Editor || (typeof location === 'object' && 'viewColumn' in location && location.viewColumn === ACTIVE_GROUP)) ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true };
for (const p of profiles) {
const isDefault = p.profileName === defaultProfileName;
const options: IMenuActionOptions = {
Expand All @@ -697,7 +698,6 @@ export function getTerminalActionBarArgs(location: ITerminalLocationOptions, pro
} as ICreateTerminalOptions,
shouldForwardArgs: true
};
const splitLocation = (location === TerminalLocation.Editor || location === { viewColumn: ACTIVE_GROUP }) ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true };
const splitOptions: IMenuActionOptions = {
arg: {
config: p,
Expand Down Expand Up @@ -725,7 +725,6 @@ export function getTerminalActionBarArgs(location: ITerminalLocationOptions, pro
},
location
})));
const splitLocation = location === TerminalLocation.Editor ? { viewColumn: SIDE_GROUP } : { splitActiveTerminal: true };
submenuActions.push(new Action('contributed-split', title, undefined, true, () => terminalService.createTerminal({
config: {
extensionIdentifier: contributed.extensionIdentifier,
Expand Down