Skip to content

Commit

Permalink
Merge branch 'master' into fix-79618
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Solorio authored Sep 13, 2019
2 parents 188ffef + ebe12f5 commit a09826f
Show file tree
Hide file tree
Showing 24 changed files with 262 additions and 87 deletions.
6 changes: 5 additions & 1 deletion extensions/theme-abyss/themes/abyss-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,10 @@
"diffEditor.removedTextBackground": "#892F4688",
// "diffEditor.removedTextBorder": "",


// Editor: Minimap
"minimap.selectionHighlight": "#750000",

// Workbench: Title
"titleBar.activeBackground": "#10192c",
// "titleBar.activeForeground": "",
Expand Down Expand Up @@ -439,4 +443,4 @@
"terminal.ansiBrightCyan": "#78ffff",
"terminal.ansiBrightWhite": "#ffffff"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"inputOption.activeBorder": "#a57a4c",
"selection.background": "#84613daa",
"editor.selectionBackground": "#84613daa",
"minimap.selectionHighlight": "#84613daa",
"editorWidget.background": "#131510",
"editorHoverWidget.background": "#221a14",
"editorGroupHeader.tabsBackground": "#131510",
Expand Down Expand Up @@ -398,4 +399,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"editor.background": "#1e1e1e",
"editor.foreground": "#c5c8c6",
"editor.selectionBackground": "#676b7180",
"minimap.selectionHighlight": "#676b7180",
"editor.selectionHighlightBackground": "#575b6180",
"editor.lineHighlightBackground": "#303030",
"editorLineNumber.activeForeground": "#949494",
Expand Down Expand Up @@ -588,4 +589,4 @@
}
}
]
}
}
1 change: 1 addition & 0 deletions extensions/theme-monokai/themes/monokai-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"selection.background": "#ccccc7",
"editor.selectionHighlightBackground": "#575b6180",
"editor.selectionBackground": "#878b9180",
"minimap.selectionHighlight": "#878b9180",
"editor.wordHighlightBackground": "#4a4a7680",
"editor.wordHighlightStrongBackground": "#6a6a9680",
"editor.lineHighlightBackground": "#3e3d32",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,7 @@
"editor.lineHighlightBackground": "#E4F6D4",
"editorLineNumber.activeForeground": "#9769dc",
"editor.selectionBackground": "#C9D0D9",
"minimap.selectionHighlight": "#C9D0D9",
"tab.modifiedBorder": "#f1897f",
"panel.background": "#F5F5F5",
"sideBar.background": "#F2F2F2",
Expand Down
3 changes: 2 additions & 1 deletion extensions/theme-red/themes/Red-color-theme.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"editor.foreground": "#F8F8F8",
"editorWhitespace.foreground": "#c10000",
"editor.selectionBackground": "#750000",
"minimap.selectionHighlight": "#750000",
"editorLineNumber.foreground": "#ff777788",
"editorLineNumber.activeForeground": "#ffbbbb88",
"editorWidget.background": "#300000",
Expand Down Expand Up @@ -411,4 +412,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,7 @@
"editor.lineHighlightBackground": "#073642",
"editorLineNumber.activeForeground": "#949494",
"editor.selectionBackground": "#274642",
"minimap.selectionHighlight": "#274642",
"editorIndentGuide.background": "#93A1A180",
"editorIndentGuide.activeBackground": "#C3E1E180",
"editorHoverWidget.background": "#004052",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@
"editorWhitespace.foreground": "#586E7580",
"editor.lineHighlightBackground": "#EEE8D5",
"editor.selectionBackground": "#EEE8D5",
"minimap.selectionHighlight": "#EEE8D5",
"editorIndentGuide.background": "#586E7580",
"editorIndentGuide.activeBackground": "#081E2580",
"editorHoverWidget.background": "#CCC4B0",
Expand Down Expand Up @@ -486,4 +487,4 @@
// Interactive Playground
"walkThrough.embeddedEditorBackground": "#00000014"
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
"editor.background": "#002451",
"editor.foreground": "#ffffff",
"editor.selectionBackground": "#003f8e",
"minimap.selectionHighlight": "#003f8e",
"editor.lineHighlightBackground": "#00346e",
"editorLineNumber.activeForeground": "#949494",
"editorCursor.foreground": "#ffffff",
Expand Down Expand Up @@ -255,4 +256,4 @@
}
}
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
this.logger.error(message, data);
}

private logTelemetry(eventName: string, properties?: { [prop: string]: string }) {
private logTelemetry(eventName: string, properties?: { readonly [prop: string]: string }) {
this.telemetryReporter.logTelemetry(eventName, properties);
}

Expand Down Expand Up @@ -287,7 +287,6 @@ export default class TypeScriptServiceClient extends Disposable implements IType

const apiVersion = this.versionPicker.currentVersion.apiVersion || API.defaultVersion;
this.onDidChangeTypeScriptVersion(currentVersion);

let mytoken = ++this.token;
const handle = this.typescriptServerSpawner.spawn(currentVersion, this.configuration, this.pluginManager);
this.serverState = new ServerState.Running(handle, apiVersion, undefined, true);
Expand All @@ -297,10 +296,13 @@ export default class TypeScriptServiceClient extends Disposable implements IType
"tsserver.spawned" : {
"${include}": [
"${TypeScriptCommonProperties}"
]
],
"localTypeScriptVersion": { "classification": "SystemMetaData", "purpose": "FeatureInsight" }
}
*/
this.logTelemetry('tsserver.spawned');
this.logTelemetry('tsserver.spawned', {
localTypeScriptVersion: this.versionProvider.localVersion ? this.versionProvider.localVersion.versionString : '',
});

handle.onError((err: Error) => {
if (this.token !== mytoken) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ interface PackageInfo {
}

export default interface TelemetryReporter {
logTelemetry(eventName: string, properties?: { [prop: string]: string }): void;
logTelemetry(eventName: string, properties?: { readonly [prop: string]: string }): void;

dispose(): void;
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "code-oss-dev",
"version": "1.39.0",
"distro": "bdaae34df8cacb0a6c48750e611bc4cd122f8df4",
"distro": "bea7d39067de4f7dcb65ac20c1a76000304ad939",
"author": {
"name": "Microsoft Corporation"
},
Expand Down
2 changes: 1 addition & 1 deletion src/vs/code/browser/workbench/workbench-dev.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
media-src 'none';
script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval' https: 'sha256-4DqvCTjCHj2KW4QxC/Yt6uBwMRyYiEg7kOoykSEkonQ=' 'sha256-meDZW3XhN5JmdjFUrWGhTouRKBiWYtXHltaKnqn/WMo=';
child-src 'self';
frame-src 'self' {{WEBVIEW_ENDPOINT}} https://*.vscode-webview-test.com;
frame-src 'self' https://*.vscode-webview-test.com;
worker-src 'self';
style-src 'self' 'unsafe-inline';
connect-src 'self' ws: wss: https:;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/code/browser/workbench/workbench.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
media-src 'none';
script-src 'self' https://az416426.vo.msecnd.net 'unsafe-eval' https: 'sha256-4DqvCTjCHj2KW4QxC/Yt6uBwMRyYiEg7kOoykSEkonQ=';
child-src 'self';
frame-src 'self' {{WEBVIEW_ENDPOINT}} https://*.vscode-webview-test.com;
frame-src 'self' https://*.vscode-webview-test.com;
worker-src 'self';
style-src 'self' 'unsafe-inline';
connect-src 'self' ws: wss: https:;
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/api/node/extHostTerminalService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ export class ExtHostTerminalService extends BaseExtHostTerminalService {
this._variableResolver,
isWorkspaceShellAllowed,
pkg.version,
terminalConfig.get<boolean>('setLocaleVariables', false),
terminalConfig.get<'auto' | 'off' | 'on'>('detectLocale', 'auto'),
baseEnv
);

Expand Down
19 changes: 11 additions & 8 deletions src/vs/workbench/contrib/customEditor/browser/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,11 @@ import { MenuId, MenuRegistry } from 'vs/platform/actions/common/actions';
import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
import { IListService } from 'vs/platform/list/browser/listService';
import { IEditorCommandsContext } from 'vs/workbench/common/editor';
import { ResourceContextKey } from 'vs/workbench/common/resources';
import { ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor';
import { getMultiSelectedResources } from 'vs/workbench/contrib/files/browser/files';
import { WebviewPanelResourceScheme } from 'vs/workbench/contrib/webview/browser/webviewEditorInput';
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';

const viewCategory = nls.localize('viewCategory', "View");
Expand Down Expand Up @@ -60,28 +61,30 @@ KeybindingsRegistry.registerCommandAndKeybindingRule({
id: REOPEN_WITH_COMMAND_ID,
weight: KeybindingWeight.WorkbenchContrib,
when: undefined,
handler: async (accessor: ServicesAccessor, resource: URI | undefined) => {
handler: async (accessor: ServicesAccessor, resource?: URI, editorContext?: IEditorCommandsContext) => {
const customEditorService = accessor.get(ICustomEditorService);
const editorService = accessor.get(IEditorService);
if (!resource) {
const editorGroupService = accessor.get(IEditorGroupsService);

let group: IEditorGroup | undefined;
if (editorContext) {
group = editorGroupService.getGroup(editorContext.groupId);
} else if (!resource) {
if (editorService.activeEditor) {
resource = editorService.activeEditor.getResource();
group = editorGroupService.activeGroup;
}
}

if (!resource) {
return;
}

if (resource.scheme === WebviewPanelResourceScheme) {
resource = URI.parse(decodeURIComponent(resource.query));
}

// Make sure the context menu has been dismissed before we prompt.
// Otherwise with webviews, we will sometimes close the prompt instantly when the webview is
// refocused by the workbench
setTimeout(() => {
customEditorService.promptOpenWith(resource!, undefined, undefined);
customEditorService.promptOpenWith(resource!, undefined, group);
}, 10);
}
});
Expand Down
25 changes: 22 additions & 3 deletions src/vs/workbench/contrib/customEditor/browser/customEditors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { URI } from 'vs/base/common/uri';
import { generateUuid } from 'vs/base/common/uuid';
import * as nls from 'vs/nls';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { IEditorOptions, ITextEditorOptions } from 'vs/platform/editor/common/editor';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IQuickInputService, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
import { IWorkbenchContribution } from 'vs/workbench/common/contributions';
import { IEditor, IEditorInput } from 'vs/workbench/common/editor';
import { EditorOptions, IEditor, IEditorInput } from 'vs/workbench/common/editor';
import { webviewEditorsExtensionPoint } from 'vs/workbench/contrib/customEditor/browser/extensionPoint';
import { CustomEditorDiscretion, CustomEditorInfo, CustomEditorSelector, ICustomEditorService } from 'vs/workbench/contrib/customEditor/common/customEditor';
import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput';
Expand Down Expand Up @@ -93,7 +93,7 @@ export class CustomEditorService implements ICustomEditorService {

if (pick.id === defaultEditorId) {
const fileInput = this.instantiationService.createInstance(FileEditorInput, resource, undefined, undefined);
return this.editorService.openEditor(fileInput, { ...options, ignoreOverrides: true }, group);
return this.openEditorForResource(resource, fileInput, { ...options, ignoreOverrides: true }, group);
} else {
return this.openWith(resource, pick.id!, options, group);
}
Expand All @@ -115,6 +115,25 @@ export class CustomEditorService implements ICustomEditorService {
if (group) {
input.updateGroup(group!.id);
}
return this.openEditorForResource(resource, input, options, group);
}

private async openEditorForResource(
resource: URI,
input: IEditorInput,
options?: IEditorOptions,
group?: IEditorGroup
): Promise<IEditor | undefined> {
if (group) {
const existingEditors = group.editors.filter(editor => editor.getResource() && editor.getResource()!.toString() === resource.toString());
if (existingEditors.length) {
await this.editorService.replaceEditors([{
editor: existingEditors[0],
replacement: input,
options: options ? EditorOptions.create(options) : undefined,
}], group);
}
}
return this.editorService.openEditor(input, options, group);
}
}
Expand Down
14 changes: 10 additions & 4 deletions src/vs/workbench/contrib/terminal/browser/terminal.contribution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,10 +194,16 @@ configurationRegistry.registerConfiguration({
type: 'number',
default: 1000
},
'terminal.integrated.setLocaleVariables': {
markdownDescription: nls.localize('terminal.integrated.setLocaleVariables', "Controls whether locale variables are set at startup of the terminal."),
type: 'boolean',
default: true
'terminal.integrated.detectLocale': {
markdownDescription: nls.localize('terminal.integrated.detectLocale', "Controls whether to detect and set the `$LANG` environment variable to a UTF-8 compliant option since VS Code's terminal only supports UTF-8 encoded data coming from the shell."),
type: 'string',
enum: ['auto', 'off', 'on'],
enumDescriptions: [
nls.localize('terminal.integrated.detectLocale.auto', "Set the `$LANG` environment variable if the existing variable does not exist or it does not end in `'.UTF-8'`."),
nls.localize('terminal.integrated.detectLocale.off', "Do not set the `$LANG` environment variable."),
nls.localize('terminal.integrated.detectLocale.on', "Always set the `$LANG` environment variable.")
],
default: 'auto'
},
'terminal.integrated.rendererType': {
type: 'string',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export class TerminalProcessManager extends Disposable implements ITerminalProce
const isWorkspaceShellAllowed = this._configHelper.checkWorkspaceShellPermissions();
this._configHelper.showRecommendations(shellLaunchConfig);
const baseEnv = this._configHelper.config.inheritEnv ? processEnv : await this._terminalInstanceService.getMainProcessParentEnv();
const env = terminalEnvironment.createTerminalEnvironment(shellLaunchConfig, lastActiveWorkspace, envFromConfigValue, this._configurationResolverService, isWorkspaceShellAllowed, this._productService.version, this._configHelper.config.setLocaleVariables, baseEnv);
const env = terminalEnvironment.createTerminalEnvironment(shellLaunchConfig, lastActiveWorkspace, envFromConfigValue, this._configurationResolverService, isWorkspaceShellAllowed, this._productService.version, this._configHelper.config.detectLocale, baseEnv);

const useConpty = this._configHelper.config.windowsEnableConpty && !isScreenReaderModeEnabled;
return this._terminalInstanceService.createTerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, useConpty);
Expand Down
2 changes: 1 addition & 1 deletion src/vs/workbench/contrib/terminal/common/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export interface ITerminalConfiguration {
fontSize: number;
letterSpacing: number;
lineHeight: number;
setLocaleVariables: boolean;
detectLocale: 'auto' | 'off' | 'on';
scrollback: number;
commandsToSkipShell: string[];
cwd: string;
Expand Down
Loading

0 comments on commit a09826f

Please sign in to comment.