fix: deprecate unity-launch flag (#209471)

pull/209588/head
Raymond Zhao 2024-04-04 15:18:19 -07:00 committed by GitHub
parent 07e1e8bba0
commit 0da22a2260
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,7 @@
Name=@@NAME_LONG@@
Comment=Code Editing. Redefined.
GenericName=Text Editor
Exec=@@EXEC@@ --unity-launch %F
Exec=@@EXEC@@ %F
Icon=@@ICON@@
Type=Application
StartupNotify=false

View File

@ -1356,7 +1356,7 @@ export class CodeApplication extends Disposable {
return windowsMainService.open({
context,
cli: args,
forceNewWindow: args['new-window'] || (!hasCliArgs && args['unity-launch']),
forceNewWindow: args['new-window'],
diffMode: args.diff,
mergeMode: args.merge,
noRecentEntry,

View File

@ -38,7 +38,6 @@ export interface NativeParsedArgs {
add?: boolean;
goto?: boolean;
'new-window'?: boolean;
'unity-launch'?: boolean; // Always open a new window, except if opening the first window or opening a file or folder as part of the launch.
'reuse-window'?: boolean;
locale?: string;
'user-data-dir'?: string;

View File

@ -157,7 +157,6 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
'crash-reporter-directory': { type: 'string' },
'crash-reporter-id': { type: 'string' },
'skip-add-to-recently-opened': { type: 'boolean' },
'unity-launch': { type: 'boolean' },
'open-url': { type: 'boolean' },
'file-write': { type: 'boolean' },
'file-chmod': { type: 'boolean' },

View File

@ -147,7 +147,7 @@ export class LaunchMainService implements ILaunchMainService {
let openNewWindow = false;
// Force new window
if (args['new-window'] || args['unity-launch'] || baseConfig.forceProfile || baseConfig.forceTempProfile) {
if (args['new-window'] || baseConfig.forceProfile || baseConfig.forceTempProfile) {
openNewWindow = true;
}