Merge from vscode 79a1f5a5ca0c6c53db617aa1fa5a2396d2caebe2

This commit is contained in:
ADS Merger
2020-05-31 19:47:51 +00:00
parent 84492049e8
commit 28be33cfea
913 changed files with 28242 additions and 15549 deletions

View File

@@ -14,6 +14,8 @@ import { IWorkbenchConstructionOptions } from 'vs/workbench/workbench.web.api';
import product from 'vs/platform/product/common/product';
import { memoize } from 'vs/base/common/decorators';
import { onUnexpectedError } from 'vs/base/common/errors';
import { LIGHT } from 'vs/platform/theme/common/themeService';
import { parseLineAndColumnAware } from 'vs/base/common/extpath';
export class BrowserEnvironmentConfiguration implements IEnvironmentConfiguration {
@@ -37,7 +39,20 @@ export class BrowserEnvironmentConfiguration implements IEnvironmentConfiguratio
if (this.payload) {
const fileToOpen = this.payload.get('openFile');
if (fileToOpen) {
return [{ fileUri: URI.parse(fileToOpen) }];
const fileUri = URI.parse(fileToOpen);
// Support: --goto parameter to open on line/col
if (this.payload.has('gotoLineMode')) {
const pathColumnAware = parseLineAndColumnAware(fileUri.path);
return [{
fileUri: fileUri.with({ path: pathColumnAware.path }),
lineNumber: pathColumnAware.line,
columnNumber: pathColumnAware.column
}];
}
return [{ fileUri }];
}
}
@@ -63,6 +78,10 @@ export class BrowserEnvironmentConfiguration implements IEnvironmentConfiguratio
get highContrast() {
return false; // could investigate to detect high contrast theme automatically
}
get defaultThemeType() {
return LIGHT;
}
}
interface IBrowserWorkbenchEnvironmentConstructionOptions extends IWorkbenchConstructionOptions {