// reset selection to placeholder session.next(); <del> assert.equal(session.isSelectionWithinPlaceholders(), false); </del> <ins> assert.equal(session.isSelectionWithinPlaceholders(), true); </ins> assert.equal(session.isAtLastPlaceholder, true); assertSelections(editor, new Selection(1, 13, 1, 13), new Selection(2, 17, 2, 17)); });


* Split search paths (./ or ../ or absolute paths in the includePatterns) into absolute paths and globs applied to those paths */ private expandSearchPathPatterns(searchPaths: string[]): ISearchPathPattern[] { <del> if (this.workspaceContextService.getWorkbenchState() === WorkbenchState.EMPTY || !searchPaths || !searchPaths.length) { </del> <ins> if (!searchPaths || !searchPaths.length) { </ins> // No workspace => ignore search paths return []; }


import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IDebugService, IExpression, IExpressionContainer } from 'vs/workbench/contrib/debug/common/debug'; import { Expression } from 'vs/workbench/contrib/debug/common/debugModel'; <del> import { renderExpressionValue } from 'vs/workbench/contrib/debug/browser/baseDebugView'; </del> <ins> import { renderExpressionValue, replaceWhitespace } from 'vs/workbench/contrib/debug/browser/baseDebugView'; </ins> import { DomScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElement'; import { attachStylerCallback } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService';


this.complexValueContainer.hidden = false; return this.tree.setInput(expression).then(() => { <del> this.complexValueTitle.textContent = expression.value; </del> <ins> this.complexValueTitle.textContent = replaceWhitespace(expression.value); </ins> this.complexValueTitle.title = expression.value; this.layoutTreeAndContainer(); this.editor.layoutContentWidget(this);


overflow: hidden; text-overflow: ellipsis; font-family: var(--monaco-monospace-font); <ins> white-space: pre; </ins> } .monaco-workbench.mac .debug-viewlet .monaco-list-row .expression,


text-overflow: ellipsis; height: 18px; overflow: hidden; <ins> white-space: pre; </ins> border-bottom: 1px solid rgba(128, 128, 128, 0.35); }


max-height: 500px; } <del> .monaco-editor .debug-hover-widget .monaco-tl-contents .value { white-space: nowrap; } </del> .monaco-editor .debug-hover-widget .error { color: #E51400; }


opacity: 0.35; } <del> .monaco-workbench .debug-viewlet .monaco-list-row .expression { white-space: pre; } </del> .debug-viewlet .debug-call-stack .error { font-style: italic; text-overflow: ellipsis;


settings: ['terminal.*'] }, { <ins> id: 'features/tasks', label: localize('tasks', "Tasks"), settings: ['tasks.*'] }, { </ins> id: 'features/problems', label: localize('problems', "Problems"), settings: ['problems.*']


this.modelService, this.configurationResolverService, this.telemetryService, this.contextService, this._environmentService, TaskService.OutputChannelId, <ins> this.configurationService, </ins> (workspaceFolder: IWorkspaceFolder) => { if (!workspaceFolder) { return undefined;


import schemaVersion1 from '../common/jsonSchema_v1'; import schemaVersion2, { updateProblemMatchers } from '../common/jsonSchema_v2'; <ins> import { IConfigurationRegistry, Extensions } from 'vs/platform/configuration/common/configurationRegistry'; </ins> schema.definitions = { ...schemaVersion1.definitions, ...schemaVersion2.definitions,


updateProblemMatchers(); jsonRegistry.notifySchemaChanged(schemaId); }); <ins> const configurationRegistry = Registry.as<IConfigurationRegistry>(Extensions.Configuration); configurationRegistry.registerConfiguration({ id: 'Tasks', order: 100, title: nls.localize('tasksConfigurationTitle', "Tasks"), type: 'object', properties: { 'tasks.terminal.windowsAllowConpty': { markdownDescription: nls.localize('tasks.terminal.windowsAllowConpty', "Works in conjunction with the `#terminal.integrated.windowsEnableConpty#` setting. Both must be enabled for tasks to use conpty. Defaults to `false`."), type: 'boolean', default: false } } }); </ins>


import { Schemas } from 'vs/base/common/network'; import { getWindowsBuildNumber } from 'vs/workbench/contrib/terminal/node/terminal'; import { IPanelService } from 'vs/workbench/services/panel/common/panelService'; <ins> import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; </ins> interface TerminalData { terminal: ITerminalInstance;


private contextService: IWorkspaceContextService, private environmentService: IWorkbenchEnvironmentService, private outputChannelId: string, <del> taskSystemInfoResolver: TaskSystemInfoResovler </del> <ins> private readonly configurationService: IConfigurationService, taskSystemInfoResolver: TaskSystemInfoResovler, </ins> ) { this.activeTasks = Object.create(null);


if (options.env) { shellLaunchConfig.env = options.env; } <ins> // Conpty doesn't do linefeeds in an expected way. Force winpty unless the user has requested otherwise. shellLaunchConfig.forceWinpty = !this.configurationService.getValue('tasks.terminal.windowsAllowConpty'); </ins> return shellLaunchConfig; }


const env = terminalEnvironment.createTerminalEnvironment(shellLaunchConfig, lastActiveWorkspace, envFromConfigValue, this._configurationResolverService, isWorkspaceShellAllowed, this._productService.version, this._configHelper.config.setLocaleVariables); this._logService.debug(`Terminal process launching`, shellLaunchConfig, initialCwd, cols, rows, env); <del> return this._terminalInstanceService.createTerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, this._configHelper.config.windowsEnableConpty); </del> <ins> const useConpty = (shellLaunchConfig.forceWinpty !== true) && this._configHelper.config.windowsEnableConpty; return this._terminalInstanceService.createTerminalProcess(shellLaunchConfig, initialCwd, cols, rows, env, useConpty); </ins> } public setDimensions(cols: number, rows: number): void {


* provided as nothing will be inherited from the process or any configuration. */ strictEnv?: boolean; <ins> /** * Moving forward, conpty will be the default. However, there are cases where conpty is not ready * to be the default. This property will force winpty to be used, even when conpty would normally be used. */ forceWinpty?: boolean; </ins> } export interface ITerminalService {


import { IDisposable, dispose, Disposable } from 'vs/base/common/lifecycle'; import { Event, Emitter } from 'vs/base/common/event'; <del> import { EventType, addDisposableListener, addClass, removeClass, isAncestor, getClientArea, position, size } from 'vs/base/browser/dom'; </del> <ins> import { EventType, addDisposableListener, addClass, removeClass, isAncestor, getClientArea, position, size, EventHelper } from 'vs/base/browser/dom'; </ins> import { onDidChangeFullscreen, isFullscreen, getZoomFactor } from 'vs/base/browser/browser'; import { IBackupFileService } from 'vs/workbench/services/backup/common/backup'; import { Registry } from 'vs/platform/registry/common/platform'; <del> import { isWindows, isLinux, isMacintosh } from 'vs/base/common/platform'; </del> <ins> import { isWindows, isLinux, isMacintosh, isWeb } from 'vs/base/common/platform'; </ins> import { pathsToEditors } from 'vs/workbench/common/editor'; import { SidebarPart } from 'vs/workbench/browser/parts/sidebar/sidebarPart'; import { PanelPart } from 'vs/workbench/browser/parts/panel/panelPart';


// Prevent workbench from scrolling #55456 this._register(addDisposableListener(this.container, EventType.SCROLL, () => this.container.scrollTop = 0)); <ins> // Prevent native context menus in web #73781 if (isWeb) { this._register(addDisposableListener(this.container, EventType.CONTEXT_MENU, (e) => EventHelper.stop(e, true))); } </ins> // Menubar visibility changes if ((isWindows || isLinux) && getTitleBarStyle(this.configurationService, this.environmentService) === 'custom') { this._register(this.titleService.onMenubarVisibilityChange(visible => this.onMenubarToggled(visible)));


this._sourceControl.inputBox.validateInput = this.validateInput.bind(this); this.disposables.push(this._sourceControl); <del> this._mergeGroup = this._sourceControl.createResourceGroup('merge', localize('merge changes', "Merge Changes")); this._indexGroup = this._sourceControl.createResourceGroup('index', localize('staged changes', "Staged Changes")); this._workingTreeGroup = this._sourceControl.createResourceGroup('workingTree', localize('changes', "Changes")); </del> <ins> this._mergeGroup = this._sourceControl.createResourceGroup('merge', localize('merge changes', "MERGE CHANGES")); this._indexGroup = this._sourceControl.createResourceGroup('index', localize('staged changes', "STAGED CHANGES")); this._workingTreeGroup = this._sourceControl.createResourceGroup('workingTree', localize('changes', "CHANGES")); </ins> const updateIndexGroupVisibility = () => { const config = workspace.getConfiguration('git', root);


flex: 1; font-size: 11px; font-weight: bold; <del> text-transform: uppercase; </del> overflow: hidden; text-overflow: ellipsis; }


AltArch := '32'; end; <del> if not Result then begin </del> <ins> if not Result and not WizardSilent() then begin </ins> MsgBox('Please uninstall the ' + AltArch + '-bit version of {#NameShort} before installing this ' + ThisArch + '-bit version.', mbInformation, MB_OK); end; end;


mapping['method'] = 'showMethods'; mapping['function'] = 'showFunctions'; mapping['constructor'] = 'showConstructors'; <ins> mapping['deprecated'] = 'showDeprecated'; </ins> mapping['field'] = 'showFields'; mapping['variable'] = 'showVariables'; mapping['class'] = 'showClasses';


default: true, markdownDescription: nls.localize('editor.suggest.showConstructors', "When enabled IntelliSense shows `constructor`-suggestions.") }, <ins> 'editor.suggest.showDeprecated': { type: 'boolean', default: true, markdownDescription: nls.localize('editor.suggest.showDeprecated', "When enabled IntelliSense shows `deprecated`-suggestions.") }, </ins> 'editor.suggest.showFields': { type: 'boolean', default: true,


showMethods: boolean(input.showMethods, this.defaultValue.showMethods), showFunctions: boolean(input.showFunctions, this.defaultValue.showFunctions), showConstructors: boolean(input.showConstructors, this.defaultValue.showConstructors), <ins> showDeprecated: boolean(input.showDeprecated, this.defaultValue.showDeprecated), </ins> showFields: boolean(input.showFields, this.defaultValue.showFields), showVariables: boolean(input.showVariables, this.defaultValue.showVariables), showClasses: boolean(input.showClasses, this.defaultValue.showClasses),


readonly snippetSortOrder = SnippetSortOrder.Bottom, readonly kindFilter = new Set<modes.CompletionItemKind>(), readonly providerFilter = new Set<modes.CompletionItemProvider>(), <ins> readonly showDeprecated = true </ins> ) { } }


} for (let suggestion of container.suggestions) { if (!options.kindFilter.has(suggestion.kind)) { <ins> // skip if not showing deprecated suggestions if (!options.showDeprecated && suggestion?.tags?.includes(modes.CompletionItemTag.Deprecated)) { continue; } </ins> // fill in default range when missing if (!suggestion.range) { suggestion.range = defaultRange;


break; } <del> const itemKindFilter = SuggestModel._createItemKindFilter(this._editor); </del> <ins> const { itemKind: itemKindFilter, showDeprecated } = SuggestModel._createSuggestFilter(this._editor); </ins> const wordDistance = WordDistance.create(this._editorWorkerService, this._editor); const completions = provideSuggestionItems( model, this._editor.getPosition(), <del> new CompletionOptions(snippetSortOrder, itemKindFilter, onlyFrom), </del> <ins> new CompletionOptions(snippetSortOrder, itemKindFilter, onlyFrom, showDeprecated), </ins> suggestCtx, this._requestToken.token );


}); } <del> private static _createItemKindFilter(editor: ICodeEditor): Set<CompletionItemKind> { </del> <ins> private static _createSuggestFilter(editor: ICodeEditor): { itemKind: Set<CompletionItemKind>; showDeprecated: boolean } { </ins> // kind filter and snippet sort rules const result = new Set<CompletionItemKind>();


if (!suggestOptions.showUsers) { result.add(CompletionItemKind.User); } if (!suggestOptions.showIssues) { result.add(CompletionItemKind.Issue); } <del> return result; </del> <ins> return { itemKind: result, showDeprecated: suggestOptions.showDeprecated }; </ins> } private _onNewContext(ctx: LineContext): void {


showMethods: true, showFunctions: true, showConstructors: true, <ins> showDeprecated: true, </ins> showFields: true, showVariables: true, showClasses: true,


*/ showConstructors?: boolean; /** <ins> * Show deprecated-suggestions. */ showDeprecated?: boolean; /** </ins> * Show field-suggestions. */ showFields?: boolean;


const args = ['for-each-ref', '--format', '%(refname) %(objectname)']; if (opts && opts.sort && opts.sort !== 'alphabetically') { <del> args.push('--sort', opts.sort); </del> <ins> args.push('--sort', `-${opts.sort}`); </ins> } const result = await this.run(args);


], { sticky: true, <del> neverShowAgain: { id: 'terminalConfigHelper/launchRecommendationsIgnore', scope: NeverShowAgainScope.WORKSPACE }, </del> <ins> neverShowAgain: { id: 'terminalConfigHelper/launchRecommendationsIgnore', scope: NeverShowAgainScope.GLOBAL }, </ins> onCancel: () => { /* __GDPR__ "terminalLaunchRecommendation:popup" : {


outline: 0; } <ins> .menubar.compact { flex-shrink: 0; } </ins> .menubar.compact > .menubar-menu-button { width: 100%; height: 100%;


} .menubar.compact .toolbar-toggle-more { <ins> position: absolute; left: 0px; top: 0px; </ins> background-position: center; background-repeat: no-repeat; background-size: 16px; cursor: pointer; width: 100%; <del> height: 100%; </del> } .menubar .toolbar-toggle-more {


if (this.globalActivityActionBar) { availableHeight -= (this.globalActivityActionBar.viewItems.length * ActivitybarPart.ACTION_HEIGHT); // adjust height for global actions showing } <ins> if (this.menubar) { availableHeight -= this.menubar.clientHeight; } </ins> this.compositeBar.layout(new Dimension(width, availableHeight)); }


width: 100%; height: 35px; } <ins> .monaco-workbench .activitybar .menubar.compact .toolbar-toggle-more { width: 100%; height: 35px; } </ins>


args.push('--'); if (paths && paths.length) { <del> args.push.apply(args, paths.map(sanitizePath)); </del> <ins> for (const chunk of splitInChunks(paths, MAX_CLI_LENGTH)) { await this.run([...args, ...chunk]); } </ins> } else { args.push('.'); <ins> await this.run(args); </ins> } <del> await this.run(args); </del> } async rm(paths: string[]): Promise<void> {


args = ['reset', '-q', treeish, '--']; } <del> if (paths && paths.length) { args.push.apply(args, paths.map(sanitizePath)); } else { args.push('.'); } </del> try { <del> await this.run(args); </del> <ins> if (paths && paths.length > 0) { for (const chunk of splitInChunks(paths, MAX_CLI_LENGTH)) { await this.run([...args, ...chunk]); } } else { args.push('.'); await this.run(args); } </ins> } catch (err) { // In case there are merge conflicts to be resolved, git reset will output // some "needs merge" data. We try to get around that.


"git.path": { "type": [ "string", <del> "null" </del> <ins> "null", "array" </ins> ], "markdownDescription": "%config.path%", "default": null,


"command.timelineCopyCommitId": "Copy Commit ID", "command.timelineCopyCommitMessage": "Copy Commit Message", "config.enabled": "Whether git is enabled.", <del> "config.path": "Path and filename of the git executable, e.g. `C:Program FilesGitbingit.exe` (Windows).", </del> <ins> "config.path": "Path and filename of the git executable, e.g. `C:Program FilesGitbingit.exe` (Windows). This can also be an array of string values containing multiple paths to look up.", </ins> "config.autoRepositoryDetection": "Configures when repositories should be automatically detected.", "config.autoRepositoryDetection.true": "Scan for both subfolders of the current opened folder and parent folders of open files.", "config.autoRepositoryDetection.false": "Disable automatic repository scanning.",


.then(undefined, () => findGitWin32InPath(onLookup)); } <del> export function findGit(hint: string | undefined, onLookup: (path: string) => void): Promise<IGit> { const first = hint ? findSpecificGit(hint, onLookup) : Promise.reject<IGit>(null); return first .then(undefined, () => { switch (process.platform) { case 'darwin': return findGitDarwin(onLookup); case 'win32': return findGitWin32(onLookup); default: return findSpecificGit('git', onLookup); } }) .then(null, () => Promise.reject(new Error('Git installation not found.'))); </del> <ins> export async function findGit(hint: string | string[] | undefined, onLookup: (path: string) => void): Promise<IGit> { const hints = Array.isArray(hint) ? hint : hint ? [hint] : []; for (const hint of hints) { try { return await findSpecificGit(hint, onLookup); } catch { // noop } } try { switch (process.platform) { case 'darwin': return await findGitDarwin(onLookup); case 'win32': return await findGitWin32(onLookup); default: return await findSpecificGit('git', onLookup); } } catch { // noop } throw new Error('Git installation not found.'); </ins> } export interface IExecutionResult<T extends string | Buffer> {


} async function createModel(context: ExtensionContext, outputChannel: OutputChannel, telemetryReporter: TelemetryReporter, disposables: Disposable[]): Promise<Model> { <del> const pathHint = workspace.getConfiguration('git').get<string>('path'); </del> <ins> const pathHint = workspace.getConfiguration('git').get<string | string[]>('path'); </ins> const info = await findGit(pathHint, path => outputChannel.appendLine(localize('looking', "Looking for git in: {0}", path))); const askpass = await Askpass.create(outputChannel, context.storagePath);


import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { Snippet, SnippetSource } from 'vs/workbench/contrib/snippets/browser/snippetsFile'; <del> import { IQuickPickItem, IQuickInputService, QuickPickInput } from 'vs/platform/quickinput/common/quickInput'; </del> import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; <del> import { Codicon } from 'vs/base/common/codicons'; import { Event } from 'vs/base/common/event'; </del> <ins> import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { pickSnippet } from 'vs/workbench/contrib/snippets/browser/snippetPicker'; </ins> class Args {


} const clipboardService = accessor.get(IClipboardService); <del> const quickInputService = accessor.get(IQuickInputService); </del> <ins> const instaService = accessor.get(IInstantiationService); </ins> const snippet = await new Promise<Snippet | undefined>((resolve, reject) => {


} else { // let user pick a snippet <del> resolve(this._pickSnippet(snippetService, quickInputService, languageId)); </del> <ins> resolve(instaService.invokeFunction(pickSnippet, languageId)); </ins> } });


} SnippetController2.get(editor)?.insert(snippet.codeSnippet, { clipboardText }); } <del> private async _pickSnippet(snippetService: ISnippetsService, quickInputService: IQuickInputService, languageId: string): Promise<Snippet | undefined> { interface ISnippetPick extends IQuickPickItem { snippet: Snippet; } const snippets = (await snippetService.getSnippets(languageId, { includeDisabledSnippets: true, includeNoPrefixSnippets: true })).sort(Snippet.compare); const makeSnippetPicks = () => { const result: QuickPickInput<ISnippetPick>[] = []; let prevSnippet: Snippet | undefined; for (const snippet of snippets) { const pick: ISnippetPick = { label: snippet.prefix || snippet.name, detail: snippet.description, snippet }; if (!prevSnippet || prevSnippet.snippetSource !== snippet.snippetSource || prevSnippet.source !== snippet.source) { let label = ''; switch (snippet.snippetSource) { case SnippetSource.User: label = nls.localize('sep.userSnippet', "User Snippets"); break; case SnippetSource.Extension: label = snippet.source; break; case SnippetSource.Workspace: label = nls.localize('sep.workspaceSnippet', "Workspace Snippets"); break; } result.push({ type: 'separator', label }); } if (snippet.snippetSource === SnippetSource.Extension) { const isEnabled = snippetService.isEnabled(snippet); if (isEnabled) { pick.buttons = [{ iconClass: Codicon.eyeClosed.classNames, tooltip: nls.localize('disableSnippet', 'Hide from IntelliSense') }]; } else { pick.description = nls.localize('isDisabled', "(hidden from IntelliSense)"); pick.buttons = [{ iconClass: Codicon.eye.classNames, tooltip: nls.localize('enable.snippet', 'Show in IntelliSense') }]; } } result.push(pick); prevSnippet = snippet; } return result; }; const picker = quickInputService.createQuickPick<ISnippetPick>(); picker.placeholder = nls.localize('pick.placeholder', "Select a snippet"); picker.matchOnDetail = true; picker.ignoreFocusOut = false; picker.keepScrollPosition = true; picker.onDidTriggerItemButton(ctx => { const isEnabled = snippetService.isEnabled(ctx.item.snippet); snippetService.updateEnablement(ctx.item.snippet, !isEnabled); picker.items = makeSnippetPicks(); }); picker.items = makeSnippetPicks(); picker.show(); // wait for an item to be picked or the picker to become hidden await Promise.race([Event.toPromise(picker.onDidAccept), Event.toPromise(picker.onDidHide)]); const result = picker.selectedItems[0]?.snippet; picker.dispose(); return result; } </del> } registerEditorAction(InsertSnippetAction);


<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import * as nls from 'vs/nls'; import { ISnippetsService } from 'vs/workbench/contrib/snippets/browser/snippets.contribution'; import { Snippet, SnippetSource } from 'vs/workbench/contrib/snippets/browser/snippetsFile'; import { IQuickPickItem, IQuickInputService, QuickPickInput } from 'vs/platform/quickinput/common/quickInput'; import { Codicon } from 'vs/base/common/codicons'; import { Event } from 'vs/base/common/event'; import { ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; export async function pickSnippet(accessor: ServicesAccessor, languageIdOrSnippets: string | Snippet[]): Promise<Snippet | undefined> { const snippetService = accessor.get(ISnippetsService); const quickInputService = accessor.get(IQuickInputService); interface ISnippetPick extends IQuickPickItem { snippet: Snippet; } let snippets: Snippet[]; if (Array.isArray(languageIdOrSnippets)) { snippets = languageIdOrSnippets; } else { snippets = (await snippetService.getSnippets(languageIdOrSnippets, { includeDisabledSnippets: true, includeNoPrefixSnippets: true })); } snippets.sort(Snippet.compare); const makeSnippetPicks = () => { const result: QuickPickInput<ISnippetPick>[] = []; let prevSnippet: Snippet | undefined; for (const snippet of snippets) { const pick: ISnippetPick = { label: snippet.prefix || snippet.name, detail: snippet.description, snippet }; if (!prevSnippet || prevSnippet.snippetSource !== snippet.snippetSource || prevSnippet.source !== snippet.source) { let label = ''; switch (snippet.snippetSource) { case SnippetSource.User: label = nls.localize('sep.userSnippet', "User Snippets"); break; case SnippetSource.Extension: label = snippet.source; break; case SnippetSource.Workspace: label = nls.localize('sep.workspaceSnippet', "Workspace Snippets"); break; } result.push({ type: 'separator', label }); } if (snippet.snippetSource === SnippetSource.Extension) { const isEnabled = snippetService.isEnabled(snippet); if (isEnabled) { pick.buttons = [{ iconClass: Codicon.eyeClosed.classNames, tooltip: nls.localize('disableSnippet', 'Hide from IntelliSense') }]; } else { pick.description = nls.localize('isDisabled', "(hidden from IntelliSense)"); pick.buttons = [{ iconClass: Codicon.eye.classNames, tooltip: nls.localize('enable.snippet', 'Show in IntelliSense') }]; } } result.push(pick); prevSnippet = snippet; } return result; }; const picker = quickInputService.createQuickPick<ISnippetPick>(); picker.placeholder = nls.localize('pick.placeholder', "Select a snippet"); picker.matchOnDetail = true; picker.ignoreFocusOut = false; picker.keepScrollPosition = true; picker.onDidTriggerItemButton(ctx => { const isEnabled = snippetService.isEnabled(ctx.item.snippet); snippetService.updateEnablement(ctx.item.snippet, !isEnabled); picker.items = makeSnippetPicks(); }); picker.items = makeSnippetPicks(); picker.show(); // wait for an item to be picked or the picker to become hidden await Promise.race([Event.toPromise(picker.onDidAccept), Event.toPromise(picker.onDidHide)]); const result = picker.selectedItems[0]?.snippet; picker.dispose(); return result; } </ins>


readonly codeSnippet: string; readonly isBogous: boolean; readonly needsClipboard: boolean; <ins> readonly usesSelection: boolean; </ins> constructor(body: string) { // init with defaults this.isBogous = false; this.needsClipboard = false; <ins> this.usesSelection = false; </ins> this.codeSnippet = body; // check snippet...


this.isBogous = true; } <del> if (marker.name === 'CLIPBOARD') { this.needsClipboard = true; </del> <ins> switch (marker.name) { case 'CLIPBOARD': this.needsClipboard = true; break; case 'SELECTION': case 'TM_SELECTED_TEXT': this.usesSelection = true; break; </ins> } } else {


return this._bodyInsights.value.needsClipboard; } <ins> get usesSelection(): boolean { return this._bodyInsights.value.usesSelection; } </ins> static compare(a: Snippet, b: Snippet): number { if (a.snippetSource < b.snippetSource) { return -1;


<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { ICodeEditor } from 'vs/editor/browser/editorBrowser'; import { EditorAction2 } from 'vs/editor/browser/editorExtensions'; import { EditorContextKeys } from 'vs/editor/common/editorContextKeys'; import { SnippetController2 } from 'vs/editor/contrib/snippet/browser/snippetController2'; import { localize } from 'vs/nls'; import { registerAction2 } from 'vs/platform/actions/common/actions'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation'; import { pickSnippet } from 'vs/workbench/contrib/snippets/browser/snippetPicker'; import { ISnippetsService } from 'vs/workbench/contrib/snippets/browser/snippets.contribution'; registerAction2(class SurroundWithAction extends EditorAction2 { constructor() { super({ id: 'editor.action.surroundWithSnippet', title: { value: localize('label', 'Surround With Snippet...'), original: 'Surround With Snippet...' }, precondition: ContextKeyExpr.and(EditorContextKeys.writable, EditorContextKeys.hasNonEmptySelection), f1: true }); } async runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor, ...args: any[]) { const snippetService = accessor.get(ISnippetsService); const clipboardService = accessor.get(IClipboardService); const instaService = accessor.get(IInstantiationService); if (!editor.hasModel()) { return; } const { lineNumber, column } = editor.getPosition(); editor.getModel().tokenizeIfCheap(lineNumber); const languageId = editor.getModel().getLanguageIdAtPosition(lineNumber, column); const allSnippets = await snippetService.getSnippets(languageId, { includeNoPrefixSnippets: true, includeDisabledSnippets: true }); const surroundSnippets = allSnippets.filter(snippet => snippet.usesSelection); const snippet = await instaService.invokeFunction(pickSnippet, surroundSnippets); if (!snippet) { return; } let clipboardText: string | undefined; if (snippet.needsClipboard) { clipboardText = await clipboardService.readText(); } SnippetController2.get(editor)?.insert(snippet.codeSnippet, { clipboardText }); } }); </ins>


import 'vs/workbench/contrib/snippets/browser/snippets.contribution'; import 'vs/workbench/contrib/snippets/browser/snippetsService'; import 'vs/workbench/contrib/snippets/browser/insertSnippet'; <ins> import 'vs/workbench/contrib/snippets/browser/surroundWithSnippet'; </ins> import 'vs/workbench/contrib/snippets/browser/configureSnippets'; import 'vs/workbench/contrib/snippets/browser/tabCompletion';


DOM.append(this.noResultsMessage, this.clearFilterLinkContainer); <del> const clearSearchContainer = $('span.clear-search'); clearSearchContainer.textContent = ' - '; const clearSearch = DOM.append(clearSearchContainer, $('a.pointer.prominent', { tabindex: 0 }, localize('clearSearch', 'Clear Search'))); this._register(DOM.addDisposableListener(clearSearch, DOM.EventType.CLICK, (e: MouseEvent) => { DOM.EventHelper.stop(e, false); this.clearSearchResults(); })); DOM.append(this.noResultsMessage, clearSearchContainer); </del> this._register(attachStylerCallback(this.themeService, { editorForeground }, colors => { this.noResultsMessage.style.color = colors.editorForeground ? colors.editorForeground.toString() : null; }));


} focus(): void { <del> if (this.activeElement) { this.activeElement.focus(); } </del> <ins> this.activeElement?.focus(); </ins> } showFind(): void { <del> if (this.activeElement && (<Webview>this.activeElement).showFind) { (<Webview>this.activeElement).showFind(); } </del> <ins> this.activeWebview?.showFind(); </ins> } runFindAction(previous: boolean): void { <del> if (this.activeElement && (<Webview>this.activeElement).runFindAction) { (<Webview>this.activeElement).runFindAction(previous); </del> <ins> this.activeWebview?.runFindAction(previous); } public get activeWebview(): Webview | undefined { if (!this.activeElement || !(this.activeElement as Webview).runFindAction) { return undefined; </ins> } <ins> return this.activeElement as Webview; </ins> } private onNavbarChange(extension: IExtension, { id, focus }: { id: string | null, focus: boolean }, template: IExtensionEditorTemplate): void {


import { InstallExtensionQuickAccessProvider, ManageExtensionsQuickAccessProvider } from 'vs/workbench/contrib/extensions/browser/extensionsQuickAccess'; import { ExtensionRecommendationsService } from 'vs/workbench/contrib/extensions/browser/extensionRecommendationsService'; import { CONTEXT_SYNC_ENABLEMENT } from 'vs/workbench/services/userDataSync/common/userDataSync'; <ins> import { CopyAction, CutAction, PasteAction } from 'vs/editor/contrib/clipboard/clipboard'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { MultiCommand } from 'vs/editor/browser/editorExtensions'; import { Webview } from 'vs/workbench/contrib/webview/browser/webview'; </ins> // Singletons registerSingleton(IExtensionsWorkbenchService, ExtensionsWorkbenchService);


} }); <ins> function overrideActionForActiveExtensionEditorWebview(command: MultiCommand | undefined, f: (webview: Webview) => void) { command?.addImplementation(105, (accessor) => { const editorService = accessor.get(IEditorService); const editor = editorService.activeEditorPane; if (editor instanceof ExtensionEditor) { if (editor.activeWebview) { f(editor.activeWebview); return true; } } return false; }); } overrideActionForActiveExtensionEditorWebview(CopyAction, webview => webview.copy()); overrideActionForActiveExtensionEditorWebview(CutAction, webview => webview.cut()); overrideActionForActiveExtensionEditorWebview(PasteAction, webview => webview.paste()); </ins> const workbenchRegistry = Registry.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench); class ExtensionsContributions implements IWorkbenchContribution {


resourceFsPath = resourceFsPath.toLowerCase(); } <del> return startsWith(resource.fsPath, rootPath); </del> <ins> return startsWith(resourceFsPath, rootPath); </ins> }


}; return this._commands.executeCommand<modes.CompletionList>('_executeCompletionItemProvider', args).then(result => { if (result) { <del> const items = result.suggestions.map(suggestion => typeConverters.CompletionItem.to(suggestion)); </del> <ins> const items = result.suggestions.map(suggestion => typeConverters.CompletionItem.to(suggestion, this._commands.converter)); </ins> return new types.CompletionList(items, result.incomplete); } return undefined;


import { LogLevel as _MainLogLevel } from 'vs/platform/log/common/log'; import { coalesce, isNonEmptyArray } from 'vs/base/common/arrays'; import { RenderLineNumbersType } from 'vs/editor/common/config/editorOptions'; <ins> import { CommandsConverter } from 'vs/workbench/api/common/extHostCommands'; </ins> export interface PositionLike { line: number;


export namespace CompletionItem { <del> export function to(suggestion: modes.CompletionItem): types.CompletionItem { </del> <ins> export function to(suggestion: modes.CompletionItem, converter?: CommandsConverter): types.CompletionItem { </ins> const result = new types.CompletionItem(suggestion.label); result.insertText = suggestion.insertText; result.kind = CompletionItemKind.to(suggestion.kind);


result.range = editorRange.Range.isIRange(suggestion.range) ? Range.to(suggestion.range) : undefined; result.range2 = editorRange.Range.isIRange(suggestion.range) ? undefined : { inserting: Range.to(suggestion.range.insert), replacing: Range.to(suggestion.range.replace) }; result.keepWhitespace = typeof suggestion.insertTextRules === 'undefined' ? false : Boolean(suggestion.insertTextRules & modes.CompletionItemInsertTextRule.KeepWhitespace); <del> // 'inserText'-logic </del> <ins> // 'insertText'-logic </ins> if (typeof suggestion.insertTextRules !== 'undefined' && suggestion.insertTextRules & modes.CompletionItemInsertTextRule.InsertAsSnippet) { result.insertText = new types.SnippetString(suggestion.insertText); } else { result.insertText = suggestion.insertText; result.textEdit = result.range instanceof types.Range ? new types.TextEdit(result.range, result.insertText) : undefined; } <del> // TODO additionalEdits, command </del> <ins> if (suggestion.additionalTextEdits && suggestion.additionalTextEdits.length > 0) { result.additionalTextEdits = suggestion.additionalTextEdits.map(e => TextEdit.to(e as modes.TextEdit)); } result.command = converter && suggestion.command ? converter.fromInternal(suggestion.command) : undefined; </ins> return result; }


} let quote: (s: string) => string; <del> let command = ''; </del> <ins> // begin command with a space to avoid polluting shell history let command = ' '; </ins> switch (shellType) {


this.ignoreSelectionChangedEvent = true; try { this.tree.setSelection([element]); <del> this.tree.reveal(element); </del> <ins> // If the element is outside of the screen bounds, // position it in the middle if (this.tree.getRelativeTop(element) === null) { this.tree.reveal(element, 0.5); } else { this.tree.reveal(element); } </ins> } catch (e) { } finally { this.ignoreSelectionChangedEvent = false;


// Create directories as needed for (let i = directoriesToCreate.length - 1; i >= 0; i--) { directory = joinPath(directory, directoriesToCreate[i]); <del> await provider.mkdir(directory); </del> <ins> try { await provider.mkdir(directory); } catch (error) { if (toFileSystemProviderErrorCode(error) !== FileSystemProviderErrorCode.FileExists) { // For mkdirp() we tolerate that the mkdir() call fails // in case the folder already exists. This follows node.js // own implementation of fs.mkdir({ recursive: true }) and // reduces the chances of race conditions leading to errors // if multiple calls try to create the same folders // As such, we only throw an error here if it is other than // the fact that the file already exists. // (see also https://github.com/microsoft/vscode/issues/89834) throw error; } } </ins> } }


import { NullLogService } from 'vs/platform/log/common/log'; import { isLinux, isWindows } from 'vs/base/common/platform'; import { DisposableStore } from 'vs/base/common/lifecycle'; <del> import { isEqual } from 'vs/base/common/resources'; </del> <ins> import { isEqual, joinPath } from 'vs/base/common/resources'; </ins> import { VSBuffer, VSBufferReadable, streamToBufferReadableStream, VSBufferReadableStream, bufferToReadable, bufferToStream, streamToBuffer } from 'vs/base/common/buffer'; import { find } from 'vs/base/common/arrays';


assert.ok(!error); }); <ins> test('writeFile - no error when writing to same non-existing folder multiple times different new files', async () => { const newFolder = URI.file(join(testDir, 'some', 'new', 'folder')); const file1 = joinPath(newFolder, 'file-1'); const file2 = joinPath(newFolder, 'file-2'); const file3 = joinPath(newFolder, 'file-3'); // this essentially verifies that the mkdirp logic implemented // in the file service is able to receive multiple requests for // the same folder and will not throw errors if another racing // call succeeded first. const newContent = 'Updates to the small file'; await Promise.all([ service.writeFile(file1, VSBuffer.fromString(newContent)), service.writeFile(file2, VSBuffer.fromString(newContent)), service.writeFile(file3, VSBuffer.fromString(newContent)) ]); assert.ok(service.exists(file1)); assert.ok(service.exists(file2)); assert.ok(service.exists(file3)); }); test('writeFile - error when writing to folder that is a file', async () => { const existingFile = URI.file(join(testDir, 'my-file')); await service.createFile(existingFile); const newFile = joinPath(existingFile, 'file-1'); let error; const newContent = 'Updates to the small file'; try { await service.writeFile(newFile, VSBuffer.fromString(newContent)); } catch (e) { error = e; } assert.ok(error); }); </ins> const runWatchTests = isLinux; (runWatchTests ? test : test.skip)('watch - file', done => {


await app.workbench.editors.newUntitledFile(); const untitled = 'Untitled-1'; <del> const textToTypeInUntitled = 'Hello, Untitled Code'; </del> <ins> const textToTypeInUntitled = untitled; </ins> await app.workbench.editor.waitForTypeInEditor(untitled, textToTypeInUntitled); const readmeMd = 'readme.md';


await stableApp.workbench.editors.newUntitledFile(); const untitled = 'Untitled-1'; <del> const textToTypeInUntitled = 'Hello, Untitled Code'; </del> <ins> const textToTypeInUntitled = untitled; </ins> await stableApp.workbench.editor.waitForTypeInEditor(untitled, textToTypeInUntitled); const readmeMd = 'readme.md';


} //#endregion <ins> //#region https://github.com/microsoft/vscode/issues/90517 export interface FileSystemError { /** * A code that identifies this error. * * Possible values are names of errors, like [`FileNotFound`](#FileSystemError.FileNotFound), * or `undefined` for an unspecified error. */ readonly code?: string; } ////#endregion </ins> }


} // file system error <del> throw new FileSystemError(err.message, err.name as files.FileSystemProviderErrorCode); </del> <ins> switch (err.name) { case files.FileSystemProviderErrorCode.FileExists: throw FileSystemError.FileExists(err.message); case files.FileSystemProviderErrorCode.FileNotFound: throw FileSystemError.FileNotFound(err.message); case files.FileSystemProviderErrorCode.FileNotADirectory: throw FileSystemError.FileNotADirectory(err.message); case files.FileSystemProviderErrorCode.FileIsADirectory: throw FileSystemError.FileIsADirectory(err.message); case files.FileSystemProviderErrorCode.NoPermissions: throw FileSystemError.NoPermissions(err.message); case files.FileSystemProviderErrorCode.Unavailable: throw FileSystemError.Unavailable(err.message); default: throw new FileSystemError(err.message, err.name as files.FileSystemProviderErrorCode); } </ins> } }


return new FileSystemError(messageOrUri, FileSystemProviderErrorCode.Unavailable, FileSystemError.Unavailable); } <ins> readonly code?: string; </ins> constructor(uriOrMessage?: string | URI, code: FileSystemProviderErrorCode = FileSystemProviderErrorCode.Unknown, terminator?: Function) { super(URI.isUri(uriOrMessage) ? uriOrMessage.toString(true) : uriOrMessage); <ins> this.code = terminator?.name; </ins> // mark the error as file system provider error so that // we can extract the error code on the receiving side markAsFileSystemProviderError(this, code);


*--------------------------------------------------------------------------------------------*/ import { URI } from 'vs/base/common/uri'; <del> import { IFileSystemProviderWithFileReadWriteCapability, FileSystemProviderCapabilities, IFileChange, IWatchOptions, IStat, FileOverwriteOptions, FileType, FileDeleteOptions, FileWriteOptions, FileChangeType, FileSystemProviderErrorCode } from 'vs/platform/files/common/files'; </del> <ins> import { IFileSystemProviderWithFileReadWriteCapability, FileSystemProviderCapabilities, IFileChange, IWatchOptions, IStat, FileOverwriteOptions, FileType, FileDeleteOptions, FileWriteOptions, FileChangeType } from 'vs/platform/files/common/files'; </ins> import { Disposable, IDisposable } from 'vs/base/common/lifecycle'; import { Event, Emitter } from 'vs/base/common/event'; import { VSBuffer } from 'vs/base/common/buffer';


size: 0 }; } <del> return Promise.reject(new FileSystemError(resource, FileSystemProviderErrorCode.FileNotFound)); </del> <ins> return Promise.reject(FileSystemError.FileNotFound(resource)); </ins> } async readdir(resource: URI): Promise<[string, FileType][]> { const hasKey = await this.hasKey(resource.path); if (hasKey) { <del> return Promise.reject(new FileSystemError(resource, FileSystemProviderErrorCode.FileNotADirectory)); </del> <ins> return Promise.reject(FileSystemError.FileNotADirectory(resource)); </ins> } const keys = await this.getAllKeys(); const files: Map<string, [string, FileType]> = new Map<string, [string, FileType]>();


async readFile(resource: URI): Promise<Uint8Array> { const hasKey = await this.hasKey(resource.path); if (!hasKey) { <del> return Promise.reject(new FileSystemError(resource, FileSystemProviderErrorCode.FileNotFound)); </del> <ins> return Promise.reject(FileSystemError.FileNotFound(resource)); </ins> } const value = await this.getValue(resource.path); return VSBuffer.fromString(value).buffer;


if (!hasKey) { const files = await this.readdir(resource); if (files.length) { <del> return Promise.reject(new FileSystemError(resource, FileSystemProviderErrorCode.FileIsADirectory)); </del> <ins> return Promise.reject(FileSystemError.FileIsADirectory(resource)); </ins> } } await this.setValue(resource.path, VSBuffer.wrap(content).toString());


}): Disposable; } //#endregion <ins> //#region export interface FileSystem { /** * Check if a given file system supports writing files. * * Keep in mind that just because a file system supports writing, that does * not mean that writes will always succeed. There may be permissions issues * or other errors that prevent writing a file. * * @param scheme The scheme of the filesystem, for example `file` or `git`. * * @return `true` if the file system supports writing, `false` if it does not * support writing (i.e. it is readonly), and `undefined` if VS Code does not * know about the filesystem. */ isWritableFileSystem(scheme: string): boolean | undefined; } //#endregion </ins> }


const extHostEditorInsets = rpcProtocol.set(ExtHostContext.ExtHostEditorInsets, new ExtHostEditorInsets(rpcProtocol.getProxy(MainContext.MainThreadEditorInsets), extHostEditors, initData.environment)); const extHostDiagnostics = rpcProtocol.set(ExtHostContext.ExtHostDiagnostics, new ExtHostDiagnostics(rpcProtocol, extHostLogService)); const extHostLanguageFeatures = rpcProtocol.set(ExtHostContext.ExtHostLanguageFeatures, new ExtHostLanguageFeatures(rpcProtocol, uriTransformer, extHostDocuments, extHostCommands, extHostDiagnostics, extHostLogService, extHostApiDeprecation)); <del> const extHostFileSystem = rpcProtocol.set(ExtHostContext.ExtHostFileSystem, new ExtHostFileSystem(rpcProtocol, extHostLanguageFeatures)); </del> <ins> const extHostFileSystem = rpcProtocol.set(ExtHostContext.ExtHostFileSystem, new ExtHostFileSystem(rpcProtocol, extHostLanguageFeatures, extHostConsumerFileSystem)); </ins> const extHostFileSystemEvent = rpcProtocol.set(ExtHostContext.ExtHostFileSystemEventService, new ExtHostFileSystemEventService(rpcProtocol, extHostLogService, extHostDocumentsAndEditors)); const extHostQuickOpen = rpcProtocol.set(ExtHostContext.ExtHostQuickOpen, new ExtHostQuickOpen(rpcProtocol, extHostWorkspace, extHostCommands)); const extHostSCM = rpcProtocol.set(ExtHostContext.ExtHostSCM, new ExtHostSCM(rpcProtocol, extHostCommands, extHostLogService));


import { commonPrefixLength } from 'vs/base/common/strings'; import { CharCode } from 'vs/base/common/charCode'; import { VSBuffer } from 'vs/base/common/buffer'; <ins> import { IExtHostConsumerFileSystem } from 'vs/workbench/api/common/extHostFileSystemConsumer'; </ins> class FsLinkProvider {


private _linkProviderRegistration?: IDisposable; private _handlePool: number = 0; <del> constructor(mainContext: IMainContext, private _extHostLanguageFeatures: ExtHostLanguageFeatures) { </del> <ins> constructor(mainContext: IMainContext, private _extHostLanguageFeatures: ExtHostLanguageFeatures, private readonly _fileSystemConsumer: IExtHostConsumerFileSystem) { </ins> this._proxy = mainContext.getProxy(MainContext.MainThreadFileSystem); // register used schemes


throw new Error(`a provider for the scheme '${scheme}' is already registered`); } <ins> const schemeRegistration = this._fileSystemConsumer._registerScheme(scheme, options); </ins> // this._registerLinkProviderIfNotYetRegistered();


return toDisposable(() => { subscription.dispose(); <ins> schemeRegistration.dispose(); </ins> this._linkProvider.delete(scheme); this._usedSchemes.delete(scheme); this._fsProvider.delete(handle);


import { VSBuffer } from 'vs/base/common/buffer'; import { createDecorator } from 'vs/platform/instantiation/common/instantiation'; import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService'; <ins> import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; </ins> export class ExtHostConsumerFileSystem implements vscode.FileSystem {


private readonly _proxy: MainThreadFileSystemShape; <ins> private readonly _schemes = new Map<string, { readonly isReadonly?: boolean }>(); </ins> constructor(@IExtHostRpcService extHostRpc: IExtHostRpcService) { this._proxy = extHostRpc.getProxy(MainContext.MainThreadFileSystem); }


copy(source: vscode.Uri, destination: vscode.Uri, options?: { overwrite?: boolean; }): Promise<void> { return this._proxy.$copy(source, destination, { ...{ overwrite: false }, ...options }).catch(ExtHostConsumerFileSystem._handleError); } <ins> isWritableFileSystem(scheme: string): boolean | undefined { const entry = this._schemes.get(scheme); if (entry) { return !entry.isReadonly; } return undefined; } </ins> private static _handleError(err: any): never { // generic error if (!(err instanceof Error)) {


default: throw new FileSystemError(err.message, err.name as files.FileSystemProviderErrorCode); } } <ins> /* internal */ _registerScheme(scheme: string, options: { readonly isReadonly?: boolean }): IDisposable { this._schemes.set(scheme, options); return toDisposable(() => { return this._schemes.delete(scheme); }); } </ins> } export interface IExtHostConsumerFileSystem extends ExtHostConsumerFileSystem { }


} .monaco-workbench .part.panel > .composite.title > .composite-bar-excess { <del> width: 100%; </del> <ins> width: 100px; </ins> } .monaco-workbench .part.panel > .title > .panel-switcher-container > .monaco-action-bar {


import * as vscode from 'vscode'; import * as nls from 'vscode-nls'; import { ITypeScriptServiceClient } from '../typescriptService'; <ins> import API from '../utils/api'; </ins> const localize = nls.loadMessageBundle();


} ]; <ins> const directives390: Directive[] = [ ...directives, { value: '@ts-expect-error', description: localize( 'ts-expect-error', "Suppresses @ts-check errors on the next line of a file, expecting at least one to exist.") } ]; </ins> class DirectiveCommentCompletionProvider implements vscode.CompletionItemProvider { <ins> private readonly directives: Directive[]; </ins> constructor( private readonly client: ITypeScriptServiceClient, <del> ) { } </del> <ins> ) { this.directives = client.apiVersion.gte(API.v390) ? directives390 : directives; } </ins> public provideCompletionItems( document: vscode.TextDocument,


const prefix = line.slice(0, position.character); const match = prefix.match(/^s*//+s?(@[a-zA-Z-]*)?$/); if (match) { <del> return directives.map(directive => { </del> <ins> return this.directives.map(directive => { </ins> const item = new vscode.CompletionItem(directive.value, vscode.CompletionItemKind.Snippet); item.detail = directive.description; item.range = new vscode.Range(position.line, Math.max(0, position.character - (match[1] ? match[1].length : 0)), position.line, position.character);


public static readonly v350 = API.fromSimpleString('3.5.0'); public static readonly v380 = API.fromSimpleString('3.8.0'); public static readonly v381 = API.fromSimpleString('3.8.1'); <ins> public static readonly v390 = API.fromSimpleString('3.9.0'); </ins> public static fromVersionString(versionString: string): API { let version = semver.valid(versionString);


easy = 42; ||| <del> >**Tip:** You can also enable the checks workspace or application wide by adding |"javascript.implicitProjectConfig.checkJs": true| to your workspace or user settings and explicitly ignoring files or lines using |// @ts-nocheck| and |// @ts-ignore|. Check out the docs on [JavaScript in VS Code](https://code.visualstudio.com/docs/languages/javascript) to learn more. </del> <ins> >**Tip:** You can also enable the checks workspace or application wide by adding |"javascript.implicitProjectConfig.checkJs": true| to your workspace or user settings and explicitly ignoring files or lines using |// @ts-nocheck| and |// @ts-expect-error|. Check out the docs on [JavaScript in VS Code](https://code.visualstudio.com/docs/languages/javascript) to learn more. </ins> ## Thanks!


SymbolInformation, SymbolKind, CompletionItem, Location, SignatureHelp, SignatureInformation, ParameterInformation, Definition, TextEdit, TextDocument, Diagnostic, DiagnosticSeverity, Range, CompletionItemKind, Hover, MarkedString, DocumentHighlight, DocumentHighlightKind, CompletionList, Position, FormattingOptions, FoldingRange, FoldingRangeKind, SelectionRange, <del> LanguageMode, Settings, SemanticTokenData </del> <ins> LanguageMode, Settings, SemanticTokenData, Workspace </ins> } from './languageModes'; import { getWordAtText, startsWith, isWhitespaceOnly, repeat } from '../utils/strings'; import { HTMLDocumentRegions } from './embeddedSupport';


jquery_d_ts = join(__dirname, '../../lib/jquery.d.ts'); // from source } <del> export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocumentRegions>, languageId: 'javascript' | 'typescript'): LanguageMode { </del> <ins> export function getJavaScriptMode(documentRegions: LanguageModelCache<HTMLDocumentRegions>, languageId: 'javascript' | 'typescript', workspace: Workspace): LanguageMode { </ins> let jsDocuments = getLanguageModelCache<TextDocument>(10, 60, document => documentRegions.get(document).getEmbeddedDocument(languageId)); const workingFile = languageId === 'javascript' ? 'vscode://javascript/1.js' : 'vscode://javascript/2.ts'; // the same 'file' is used for all contents <del> let compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic }; </del> <ins> let compilerOptions: ts.CompilerOptions = { allowNonTsExtensions: true, allowJs: true, lib: ['lib.es6.d.ts'], target: ts.ScriptTarget.Latest, moduleResolution: ts.ModuleResolutionKind.Classic, experimentalDecorators: false }; </ins> let currentTextDocument: TextDocument; let scriptFileVersion: number = 0; function updateCurrentTextDocument(doc: TextDocument) {


getId() { return languageId; }, <del> doValidation(document: TextDocument): Diagnostic[] { </del> <ins> doValidation(document: TextDocument, settings = workspace.settings): Diagnostic[] { </ins> updateCurrentTextDocument(document); <ins> host.getCompilationSettings()['experimentalDecorators'] = settings && settings.javascript && settings.javascript.implicitProjectConfig.experimentalDecorators; </ins> const syntaxDiagnostics: ts.Diagnostic[] = jsLanguageService.getSyntacticDiagnostics(workingFile); const semanticDiagnostics = jsLanguageService.getSemanticDiagnostics(workingFile); return syntaxDiagnostics.concat(semanticDiagnostics).map((diag: ts.Diagnostic): Diagnostic => {


modes['css'] = getCSSMode(cssLanguageService, documentRegions, workspace); } if (supportedLanguages['javascript']) { <del> modes['javascript'] = getJavaScriptMode(documentRegions, 'javascript'); modes['typescript'] = getJavaScriptMode(documentRegions, 'typescript'); </del> <ins> modes['javascript'] = getJavaScriptMode(documentRegions, 'javascript', workspace); modes['typescript'] = getJavaScriptMode(documentRegions, 'typescript', workspace); </ins> } return { getModeAtPosition(document: TextDocument, position: Position): LanguageMode | undefined {


if (this.canSelectMany) { this.ui.list.domFocus(); } <del> event.preventDefault(); </del> <ins> dom.EventHelper.stop(event, true); </ins> break; case KeyCode.UpArrow: if (this.ui.list.getFocusedElements().length) {


if (this.canSelectMany) { this.ui.list.domFocus(); } <del> event.preventDefault(); </del> <ins> dom.EventHelper.stop(event, true); </ins> break; case KeyCode.PageDown: this.ui.list.focus(QuickInputListFocus.NextPage); if (this.canSelectMany) { this.ui.list.domFocus(); } <del> event.preventDefault(); </del> <ins> dom.EventHelper.stop(event, true); </ins> break; case KeyCode.PageUp: this.ui.list.focus(QuickInputListFocus.PreviousPage); if (this.canSelectMany) { this.ui.list.domFocus(); } <del> event.preventDefault(); </del> <ins> dom.EventHelper.stop(event, true); </ins> break; case KeyCode.RightArrow: if (!this._canAcceptInBackground) {


case KeyCode.Home: if (event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey) { this.ui.list.focus(QuickInputListFocus.First); <del> event.preventDefault(); </del> <ins> dom.EventHelper.stop(event, true); </ins> } break; case KeyCode.End: if (event.ctrlKey && !event.shiftKey && !event.altKey && !event.metaKey) { this.ui.list.focus(QuickInputListFocus.Last); <del> event.preventDefault(); </del> <ins> dom.EventHelper.stop(event, true); </ins> } break; }


"languages": [{ "id": "shellscript", "aliases": ["Shell Script", "shellscript", "bash", "sh", "zsh", "ksh", "csh"], <del> "extensions": [".sh", ".bash", ".bashrc", ".bash_aliases", ".bash_profile", ".bash_login", ".ebuild", ".install", ".profile", ".bash_logout", ".zsh", ".zshrc", ".zprofile", ".zlogin", ".zlogout", ".zshenv", ".zsh-theme", ".ksh", ".csh", ".cshrc"], </del> <ins> "extensions": [ ".sh", ".bash", ".bashrc", ".bash_aliases", ".bash_profile", ".bash_login", ".ebuild", ".install", ".profile", ".bash_logout", ".zsh", ".zshrc", ".zprofile", ".zlogin", ".zlogout", ".zshenv", ".zsh-theme", ".ksh", ".csh", ".cshrc", ".tcshrc", ".yashrc", ".yash_profile" ], </ins> "filenames": [ <del> "APKBUILD", "PKGBUILD", ".envrc" ], "firstLine": "^#!.*b(bash|zsh|sh|tcsh|ksh|ash|qsh|csh).*|^#s*-*-[^*]*mode:s*shell-script[^*]*-*-", </del> <ins> "APKBUILD", "PKGBUILD", ".envrc", ".hushlogin", "zshrc", "zshenv", "zlogin", "zprofile", "zlogout", "bashrc_Apple_Terminal", "zshrc_Apple_Terminal" ], "firstLine": "^#!.*b(bash|zsh|sh|ksh|dtksh|pdksh|mksh|ash|dash|yash|sh|csh|jcsh|tcsh|itcsh).*|^#s*-*-[^*]*mode:s*shell-script[^*]*-*-", </ins> "configuration": "./language-configuration.json", "mimetypes": ["text/x-shellscript"] }],


} hide() { <del> this._isExpanded = false; // Focus the container so that the comment editor will be blurred before it is hidden this.editor.focus(); </del> <ins> if (this._isExpanded) { this._isExpanded = false; // Focus the container so that the comment editor will be blurred before it is hidden this.editor.focus(); } </ins> super.hide(); }


"pickerGroup.foreground": "#b0b0b0", "terminal.ansiWhite": "#ffffff", "inputOption.activeBorder": "#3655b5", <del> "focusBorder": "#3655b5" </del> <ins> "focusBorder": "#3655b5", "terminal.ansiBlack": "#1e1e1e", "terminal.ansiRed": "#C4265E", // the bright color with ~75% transparent on the background "terminal.ansiGreen": "#86B42B", "terminal.ansiYellow": "#B3B42B", "terminal.ansiBlue": "#6A7EC8", "terminal.ansiMagenta": "#8C6BC8", "terminal.ansiCyan": "#56ADBC", "terminal.ansiWhite": "#e3e3dd", "terminal.ansiBrightBlack": "#666666", "terminal.ansiBrightRed": "#f92672", "terminal.ansiBrightGreen": "#A6E22E", "terminal.ansiBrightYellow": "#e2e22e", // hue shifted #A6E22E "terminal.ansiBrightBlue": "#819aff", // hue shifted #AE81FF "terminal.ansiBrightMagenta": "#AE81FF", "terminal.ansiBrightCyan": "#66D9EF", "terminal.ansiBrightWhite": "#f8f8f2" </ins> }, "tokenColors": [ {


return false; } <del> const context = await this.requestService.request({ url: this.url }, CancellationToken.None); // The update server replies with 204 (No Content) when no // update is available - that's all we want to know. return context.res.statusCode === 204; </del> <ins> try { const context = await this.requestService.request({ url: this.url }, CancellationToken.None); // The update server replies with 204 (No Content) when no // update is available - that's all we want to know. return context.res.statusCode === 204; } catch (error) { this.logService.error('update#isLatestVersion(): failed to check for updates'); this.logService.error(error); return undefined; } </ins> } async _applySpecificUpdate(packagePath: string): Promise<void> {


<del> 2019-08-30T20:24:23.714Z </del> <ins> 2020-10-05T20:24:23.714Z </ins>


"opn": "^6.0.0", "optimist": "0.3.5", "p-all": "^1.0.0", <del> "playwright": "0.15.0", </del> <ins> "playwright": "1.0.1", </ins> "pump": "^1.0.1", "queue": "3.0.6", "rcedit": "^1.1.0",


dependencies: find-up "^3.0.0" <del> playwright-core@=0.15.0: version "0.15.0" resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-0.15.0.tgz#c605c98a13c81d5a2e2691f15d04758cf302c20a" integrity sha512-uTm4PoF2U3iXkLMMG9vlTxlGfO8atQGAHDxqi8xV7hEjNSYeLTU7c6HN5zwadeHRVuBbNsZ4yqu9u4hoqC7uxQ== </del> <ins> playwright-core@=1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.0.1.tgz#823b6f1afa16917ffd418f3cec0c14688a985738" integrity sha512-a71FjUDRFqWLG3VBAojVen2TaZiXkuog+ZmI0Nh0+/QndFUbbW3kameOfUTMXFvLUGWx2ipERZx6EQTJMEQDMA== </ins> dependencies: debug "^4.1.1" extract-zip "^2.0.0"


rimraf "^3.0.2" ws "^6.1.0" <del> playwright@0.15.0: version "0.15.0" resolved "https://registry.yarnpkg.com/playwright/-/playwright-0.15.0.tgz#bf5c3bb8404975aba78459310742388c08438431" integrity sha512-UGHkQz8DT43uJ0KgMh2rmj8BI4FE5ReQJ9nm5mG68tt1Cj2sXPdM2b05qptfYYBPtQRetQqtJTauZ6rlCDemaQ== </del> <ins> playwright@1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.0.1.tgz#326d479829a3505799ddc9988cc8decf5a7f8376" integrity sha512-kVTE7uvZ7OcDVOBx7MVArUm2nbzzzpauKV9tuVIAH6vWGsOWbGGALUoTWMzNDzsPPTBJXXmxzC4KgI2zN+kVhw== </ins> dependencies: <del> playwright-core "=0.15.0" </del> <ins> playwright-core "=1.0.1" </ins> plist@^3.0.1: version "3.0.1"


<del> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#646465" d="M6 4v8l4-4-4-4zm1 2.414L8.586 8 7 9.586V6.414z"/></svg> </del>  No newline at end of file


<del> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path fill="#646465" d="M11 10H5.344L11 4.414V10z"/></svg> </del>  No newline at end of file


width: 100%; table-layout: fixed; } th[scope='col'] { vertical-align: bottom; border-bottom: 1px solid #cccccc;


border-top: 1px solid #cccccc; cursor: default; } td { padding: .25rem; vertical-align: top;


display: none; } <del> img { width: 16px; margin-right: 4px; </del> <ins> .header { display: flex; </ins> }


*--------------------------------------------------------------------------------------------*/ import 'vs/css!./media/processExplorer'; <ins> import 'vs/base/browser/ui/codicons/codiconStyles'; // make sure codicon css is loaded </ins> import { ElectronService, IElectronService } from 'vs/platform/electron/electron-sandbox/electron'; import { ipcRenderer } from 'vs/base/parts/sandbox/electron-sandbox/globals'; import { localize } from 'vs/nls';


import { DisposableStore } from 'vs/base/common/lifecycle'; import { isRemoteDiagnosticError, IRemoteDiagnosticError } from 'vs/platform/diagnostics/common/diagnostics'; import { MainProcessService } from 'vs/platform/ipc/electron-sandbox/mainProcessService'; <ins> import { CodiconLabel } from 'vs/base/browser/ui/codicons/codiconLabel'; </ins> const DEBUG_FLAGS_PATTERN = /s--(inspect|debug)(-brk|port)?=(d+)?/; const DEBUG_PORT_PATTERN = /s--(inspect|debug)-port=(d+)/;


return maxProcessId; } <del> private updateSectionCollapsedState(shouldExpand: boolean, body: HTMLElement, twistie: HTMLImageElement, sectionName: string) { </del> <ins> private updateSectionCollapsedState(shouldExpand: boolean, body: HTMLElement, twistie: CodiconLabel, sectionName: string) { </ins> if (shouldExpand) { body.classList.remove('hidden'); this.collapsedStateCache.set(sectionName, false); <del> twistie.src = './media/expanded.svg'; </del> <ins> twistie.text = '$(chevron-down)'; </ins> } else { body.classList.add('hidden'); this.collapsedStateCache.set(sectionName, true); <del> twistie.src = './media/collapsed.svg'; </del> <ins> twistie.text = '$(chevron-right)'; </ins> } }


private renderProcessGroupHeader(sectionName: string, body: HTMLElement, container: HTMLElement) { const headerRow = document.createElement('tr'); <del> const data = document.createElement('td'); data.textContent = sectionName; data.colSpan = 4; headerRow.appendChild(data); const twistie = document.createElement('img'); this.updateSectionCollapsedState(!this.collapsedStateCache.get(sectionName), body, twistie, sectionName); data.prepend(twistie); </del> <ins> const headerData = document.createElement('td'); headerData.colSpan = 4; headerRow.appendChild(headerData); const headerContainer = document.createElement('div'); headerContainer.className = 'header'; headerData.appendChild(headerContainer); const twistieContainer = document.createElement('div'); const twistieCodicon = new CodiconLabel(twistieContainer); this.updateSectionCollapsedState(!this.collapsedStateCache.get(sectionName), body, twistieCodicon, sectionName); headerContainer.appendChild(twistieContainer); const headerLabel = document.createElement('span'); headerLabel.textContent = sectionName; headerContainer.appendChild(headerLabel); </ins> <del> this.listeners.add(addDisposableListener(data, 'click', (e) => { </del> <ins> this.listeners.add(addDisposableListener(headerData, 'click', (e) => { </ins> const isHidden = body.classList.contains('hidden'); <del> this.updateSectionCollapsedState(isHidden, body, twistie, sectionName); </del> <ins> this.updateSectionCollapsedState(isHidden, body, twistieCodicon, sectionName); </ins> })); container.appendChild(headerRow);


constructor() { this.tokenTypeById = {}; this.tokenModifierById = {}; <del> this.typeHierarchy = {}; </del> <ins> this.typeHierarchy = Object.create(null); </ins> } public registerTokenType(id: string, description: string, superType?: string, deprecationMessage?: string): void {


const stylingSchemeEntry = getStylingSchemeEntry(description, deprecationMessage); this.tokenStylingSchema.properties[id] = stylingSchemeEntry; <del> this.typeHierarchy = {}; </del> <ins> this.typeHierarchy = Object.create(null); </ins> } public registerTokenModifier(id: string, description: string, deprecationMessage?: string): void {


public deregisterTokenType(id: string): void { delete this.tokenTypeById[id]; delete this.tokenStylingSchema.properties[id]; <del> this.typeHierarchy = {}; </del> <ins> this.typeHierarchy = Object.create(null); </ins> } public deregisterTokenModifier(id: string): void {


disturl "https://atom.io/download/electron" <del> target "9.2.0" </del> <ins> target "9.2.1" </ins> runtime "electron"


"git": { "name": "electron", "repositoryUrl": "https://github.com/electron/electron", <del> "commitHash": "0c2cb59b6283fe8d6bb4b14f8a832e2166aeaa0c" </del> <ins> "commitHash": "03c7a54dc534ce1867d4393b9b1a6989d4a7e005" </ins> } }, "isOnlyProductionDependency": true, "license": "MIT", <del> "version": "9.2.0" </del> <ins> "version": "9.2.1" </ins> }, { "component": {


"css-loader": "^3.2.0", "debounce": "^1.0.0", "deemon": "^1.4.0", <del> "electron": "9.2.0", </del> <ins> "electron": "9.2.1", </ins> "eslint": "6.8.0", "eslint-plugin-jsdoc": "^19.1.0", "event-stream": "3.3.4",


resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.27.tgz#78ecb8a399066187bb374eede35d9c70565a803d" integrity sha1-eOy4o5kGYYe7N07t412ccFZagD0= <del> electron@9.2.0: version "9.2.0" resolved "https://registry.yarnpkg.com/electron/-/electron-9.2.0.tgz#d9fc8c8c9e5109669c366bd7b9ba83b06095d7a4" integrity sha512-4ecZ3rcGg//Gk4fAK3Jo61T+uh36JhU6HHR/PTujQqQiBw1g4tNPd4R2hGGth2d+7FkRIs5GdRNef7h64fQEMw== </del> <ins> electron@9.2.1: version "9.2.1" resolved "https://registry.yarnpkg.com/electron/-/electron-9.2.1.tgz#54ef574e1af4ae967b5efa94312f1b6458d44a02" integrity sha512-ZsetaQjXB8+9/EFW1FnfK4ukpkwXCxMEaiKiUZhZ0ZLFlLnFCpe0Bg4vdDf7e4boWGcnlgN1jAJpBw7w0eXuqA== </ins> dependencies: "@electron/get" "^1.0.1" "@types/node" "^12.0.12"


).snippet.value, 'foobar(${1:param})$0'); }); <ins> test('Should skip over this parameter', async () => { assert.strictEqual( snippetForFunctionCall( { label: 'foobar', }, [{ "text": "function", "kind": "keyword" }, { "text": " ", "kind": "space" }, { "text": "foobar", "kind": "functionName" }, { "text": "(", "kind": "punctuation" }, { "text": "this", "kind": "parameterName" }, { "text": ":", "kind": "punctuation" }, { "text": " ", "kind": "space" }, { "text": "string", "kind": "keyword" }, { "text": ",", "kind": "punctuation" }, { "text": "param", "kind": "parameterName" }, { "text": ":", "kind": "punctuation" }, { "text": " ", "kind": "space" }, { "text": "string", "kind": "keyword" }, { "text": ")", "kind": "punctuation" }, { "text": ":", "kind": "punctuation" }, { "text": " ", "kind": "space" }, { "text": "void", "kind": "keyword" }] ).snippet.value, 'foobar(${1:param})$0'); }); </ins> });


const next = displayParts[i + 1]; // Skip optional parameters const nameIsFollowedByOptionalIndicator = next && next.text === '?'; <del> if (!nameIsFollowedByOptionalIndicator) { </del> <ins> // Skip this parameter const nameIsThis = part.text === 'this'; if (!nameIsFollowedByOptionalIndicator && !nameIsThis) { </ins> parts.push(part); } hasOptionalParameters = hasOptionalParameters || nameIsFollowedByOptionalIndicator;


return classes; } <ins> export function getIconClassesForModeId(modeId: string): string[] { return ['file-icon', `${cssEscape(modeId)}-lang-file-icon`]; } </ins> export function detectModeId(modelService: IModelService, modeService: IModeService, resource: uri): string | null { if (!resource) { return null; // we need a resource at least


import { IFileService, FILES_ASSOCIATIONS_CONFIG } from 'vs/platform/files/common/files'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IModeService, ILanguageSelection } from 'vs/editor/common/services/modeService'; <del> import { IModelService } from 'vs/editor/common/services/modelService'; </del> import { Range } from 'vs/editor/common/core/range'; import { Selection } from 'vs/editor/common/core/selection'; import { TabFocus } from 'vs/editor/common/config/commonEditorConfig';


import { Schemas } from 'vs/base/common/network'; import { IPreferencesService } from 'vs/workbench/services/preferences/common/preferences'; import { IQuickInputService, IQuickPickItem, QuickPickInput } from 'vs/platform/quickinput/common/quickInput'; <del> import { getIconClasses } from 'vs/editor/common/services/getIconClasses'; </del> <ins> import { getIconClassesForModeId } from 'vs/editor/common/services/getIconClasses'; </ins> import { timeout } from 'vs/base/common/async'; import { INotificationHandle, INotificationService, Severity } from 'vs/platform/notification/common/notification'; import { Event } from 'vs/base/common/event';


actionId: string, actionLabel: string, @IModeService private readonly modeService: IModeService, <del> @IModelService private readonly modelService: IModelService, </del> @IEditorService private readonly editorService: IEditorService, @IConfigurationService private readonly configurationService: IConfigurationService, @IQuickInputService private readonly quickInputService: IQuickInputService,


} // Compute mode <ins> let currentLanguageId: string | undefined; </ins> let currentModeId: string | undefined; <del> let modeId: string | undefined; </del> if (textModel) { <del> modeId = textModel.getLanguageIdentifier().language; currentModeId = withNullAsUndefined(this.modeService.getLanguageName(modeId)); </del> <ins> currentModeId = textModel.getLanguageIdentifier().language; currentLanguageId = withNullAsUndefined(this.modeService.getLanguageName(currentModeId)); </ins> } // All languages are valid picks const languages = this.modeService.getRegisteredLanguageNames(); const picks: QuickPickInput[] = languages.sort().map((lang, index) => { <ins> const modeId = this.modeService.getModeIdForLanguageName(lang.toLowerCase()) || 'unknown'; </ins> let description: string; <del> if (currentModeId === lang) { description = nls.localize('languageDescription', "({0}) - Configured Language", this.modeService.getModeIdForLanguageName(lang.toLowerCase())); </del> <ins> if (currentLanguageId === lang) { description = nls.localize('languageDescription', "({0}) - Configured Language", modeId); </ins> } else { <del> description = nls.localize('languageDescriptionConfigured', "({0})", this.modeService.getModeIdForLanguageName(lang.toLowerCase())); </del> <ins> description = nls.localize('languageDescriptionConfigured', "({0})", modeId); </ins> } return { label: lang, <del> iconClasses: getIconClasses(this.modelService, this.modeService, this.getFakeResource(lang)), </del> <ins> iconClasses: getIconClassesForModeId(modeId), </ins> description }; });


picks.unshift(galleryAction); } <del> configureModeSettings = { label: nls.localize('configureModeSettings', "Configure '{0}' language based settings...", currentModeId) }; </del> <ins> configureModeSettings = { label: nls.localize('configureModeSettings', "Configure '{0}' language based settings...", currentLanguageId) }; </ins> picks.unshift(configureModeSettings); configureModeAssociations = { label: nls.localize('configureAssociationsExt', "Configure File Association for '{0}'...", ext) }; picks.unshift(configureModeAssociations);


// User decided to configure settings for current language if (pick === configureModeSettings) { <del> this.preferencesService.openGlobalSettings(true, { editSetting: `[${withUndefinedAsNull(modeId)}]` }); </del> <ins> this.preferencesService.openGlobalSettings(true, { editSetting: `[${withUndefinedAsNull(currentModeId)}]` }); </ins> return; }


const languages = this.modeService.getRegisteredLanguageNames(); const picks: IQuickPickItem[] = languages.sort().map((lang, index) => { <del> const id = withNullAsUndefined(this.modeService.getModeIdForLanguageName(lang.toLowerCase())); </del> <ins> const id = withNullAsUndefined(this.modeService.getModeIdForLanguageName(lang.toLowerCase())) || 'unknown'; </ins> return { id, label: lang, <del> iconClasses: getIconClasses(this.modelService, this.modeService, this.getFakeResource(lang)), </del> <ins> iconClasses: getIconClassesForModeId(id), </ins> description: (id === currentAssociation) ? nls.localize('currentAssociation', "Current Association") : undefined }; });


} }, 50 /* quick input is sensitive to being opened so soon after another */); } <del> private getFakeResource(lang: string): URI | undefined { let fakeResource: URI | undefined; const extensions = this.modeService.getExtensions(lang); if (extensions?.length) { fakeResource = URI.file(extensions[0]); } else { const filenames = this.modeService.getFilenames(lang); if (filenames?.length) { fakeResource = URI.file(filenames[0]); } } return fakeResource; } </del> } export interface IChangeEOLEntry extends IQuickPickItem {


"languages": [{ "id": "groovy", "aliases": ["Groovy", "groovy"], <del> "extensions": [".groovy", ".gvy", ".gradle"], "filenames": [ "Jenkinsfile" ], </del> <ins> "extensions": [".groovy", ".gvy", ".gradle", ".jenkinsfile"], "filenamePatterns": ["Jenkinsfile.*"], </ins> "firstLine": "^#!.*bgroovyb", "configuration": "./language-configuration.json" }],


*  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ <del> import { exec } from 'child_process'; import { isWindows } from 'vs/base/common/platform'; const cmdline = { windows: 'getmac.exe', unix: '/sbin/ifconfig -a || /sbin/ip link' }; </del> <ins> import { networkInterfaces } from 'os'; </ins> const invalidMacAddresses = new Set([ '00:00:00:00:00:00',


function doGetMac(): Promise<string> { return new Promise((resolve, reject) => { try { <del> exec(isWindows ? cmdline.windows : cmdline.unix, { timeout: 10000 }, (err, stdout, stdin) => { if (err) { return reject(`Unable to retrieve mac address (${err.toString()})`); } else { const regex = /(?:[a-fd]{2}[:-]){5}[a-fd]{2}/gi; let match; while ((match = regex.exec(stdout)) !== null) { const macAddressCandidate = match[0]; if (validateMacAddress(macAddressCandidate)) { return resolve(macAddressCandidate); } </del> <ins> const ifaces = networkInterfaces(); for (const [, infos] of Object.entries(ifaces)) { for (const info of infos) { if (validateMacAddress(info.mac)) { return resolve(info.mac); </ins> } <del> return reject('Unable to retrieve mac address (unexpected format)'); </del> } <del> }); </del> <ins> } reject('Unable to retrieve mac address (unexpected format)'); </ins> } catch (err) { reject(err); }


export interface IFindInFilesArgs { query?: string; replace?: string; <ins> preserveCase?: boolean; </ins> triggerSearch?: boolean; filesToInclude?: string; filesToExclude?: string; isRegex?: boolean; isCaseSensitive?: boolean; matchWholeWord?: boolean; <ins> excludeSettingAndIgnoreFiles?: boolean; </ins> } export const FindInFilesCommand: ICommandHandler = (accessor, args: IFindInFilesArgs = {}) => {


if (typeof args.triggerSearch === 'boolean' && args.triggerSearch) { this.triggerQueryChange(); } <ins> if (typeof args.preserveCase === 'boolean') { this.searchWidget.replaceInput.setPreserveCase(args.preserveCase); } if (typeof args.excludeSettingAndIgnoreFiles === 'boolean') { this.inputPatternExcludes.setUseExcludesAndIgnoreFiles(args.excludeSettingAndIgnoreFiles); } </ins> } toggleQueryDetails(moveFocus = true, show?: boolean, skipLayout?: boolean, reverse?: boolean): void {


|| (keyCode === KeyCode.End) || (keyCode === KeyCode.PageDown) || (keyCode === KeyCode.PageUp) <ins> || (keyCode === KeyCode.Backspace) </ins> ) { // "Dispatch" on keyCode for these key codes to workaround issues with remote desktoping software // where the scan codes appear to be incorrect (see https://github.com/microsoft/vscode/issues/24107)


containerIcon: icon || viewContainer?.icon, containerTitle: item.contextualTitle || viewContainer?.name, canToggleVisibility: true, <del> canMoveView: true, </del> <ins> canMoveView: viewContainer?.id !== REMOTE, </ins> treeView: type === ViewType.Tree ? this.instantiationService.createInstance(CustomTreeView, item.id, item.name) : undefined, collapsed: this.showCollapsed(container) || initialVisibility === InitialVisibility.Collapsed, order: order,


if (breakpoint.logMessage || breakpoint.condition || breakpoint.hitCondition) { const messages: string[] = []; <ins> let icon = breakpoint.logMessage ? icons.logBreakpoint.regular : icons.conditionalBreakpoint.regular; </ins> if (!breakpoint.supported) { <del> return { icon: icons.debugBreakpointUnsupported, message: localize('breakpointUnsupported', "Breakpoints of this type are not supported by the debugger"), }; </del> <ins> icon = icons.debugBreakpointUnsupported; messages.push(localize('breakpointUnsupported', "Breakpoints of this type are not supported by the debugger")); </ins> } if (breakpoint.logMessage) {


} return { <del> icon: breakpoint.logMessage ? icons.logBreakpoint.regular : icons.conditionalBreakpoint.regular, </del> <ins> icon, </ins> message: appendMessage(messages.join('n')) }; }


return result; } <ins> export function getCaseInsensitive(target: obj, key: string): any { const lowercaseKey = key.toLowerCase(); const equivalentKey = Object.keys(target).find(k => k.toLowerCase() === lowercaseKey); return equivalentKey ? target[equivalentKey] : target[key]; } </ins>


diff = objects.distinct(base, obj); assert.deepEqual(diff, obj); }); <del> }); </del>  No newline at end of file <ins> test('getCaseInsensitive', () => { const obj1 = { lowercase: 123, mIxEdCaSe: 456 }; assert.equal(obj1.lowercase, objects.getCaseInsensitive(obj1, 'lowercase')); assert.equal(obj1.lowercase, objects.getCaseInsensitive(obj1, 'lOwErCaSe')); assert.equal(obj1.mIxEdCaSe, objects.getCaseInsensitive(obj1, 'MIXEDCASE')); assert.equal(obj1.mIxEdCaSe, objects.getCaseInsensitive(obj1, 'mixedcase')); }); }); </ins>


import { readFile, exists } from 'vs/base/node/pfs'; import * as path from 'vs/base/common/path'; import { isString } from 'vs/base/common/types'; <ins> import { getCaseInsensitive } from 'vs/base/common/objects'; </ins> let mainProcessParentEnv: IProcessEnvironment | undefined;


const fullPath = path.join(cwd, command); return await exists(fullPath) ? fullPath : undefined; } <del> if (paths === undefined && isString(env.PATH)) { paths = env.PATH.split(path.delimiter); </del> <ins> const envPath = getCaseInsensitive(env, 'PATH'); if (paths === undefined && isString(envPath)) { paths = envPath.split(path.delimiter); </ins> } // No PATH environment. Make path absolute to the cwd. if (paths === undefined || paths.length === 0) {


{ "displayName": "Tomorrow Night Blue Theme", "description": "Tomorrow night blue theme for Visual Studio Code", <del> "themeLabel": "Quiet Light" </del> <ins> "themeLabel": "Tomorrow Night Blue" </ins> }


const runToolbar = this.setupRunToolbar(runButtonContainer, container, contextKeyService, disposables); const executionOrderLabel = DOM.append(cellContainer, $('div.execution-count-label')); <ins> executionOrderLabel.setAttribute('title', 'Execution Order'); </ins> const editorPart = DOM.append(cellContainer, $('.cell-editor-part')); const editorContainer = DOM.append(editorPart, $('.cell-editor-container'));


registerAction2(class OpenSearchEditorAction extends Action2 { constructor() { super({ <del> id: SearchEditorConstants.OpenNewEditorCommandId, title: localize('search.openNewEditor', "Open New Search Editor"), </del> <ins> id: 'search.action.openNewEditorFromView', title: localize('search.openNewEditor', "Open New Search Editor from View"), </ins> category, icon: searchNewEditorIcon, <del> f1: true, </del> menu: [{ id: MenuId.ViewTitle, group: 'navigation',


export const listInactiveFocusOutline = registerColor('list.inactiveFocusOutline', { dark: null, light: null, hc: null }, nls.localize('listInactiveFocusOutline', "List/Tree outline color for the focused item when the list/tree is inactive. An active list/tree has keyboard focus, an inactive does not.")); export const listHoverBackground = registerColor('list.hoverBackground', { dark: '#2A2D2E', light: '#F0F0F0', hc: null }, nls.localize('listHoverBackground', "List/Tree background when hovering over items using the mouse.")); export const listHoverForeground = registerColor('list.hoverForeground', { dark: null, light: null, hc: null }, nls.localize('listHoverForeground', "List/Tree foreground when hovering over items using the mouse.")); <del> export const listDropBackground = registerColor('list.dropBackground', { dark: listFocusBackground, light: listFocusBackground, hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); </del> <ins> export const listDropBackground = registerColor('list.dropBackground', { dark: '#062F4A', light: '#D6EBFF', hc: null }, nls.localize('listDropBackground', "List/Tree drag and drop background when moving items around using the mouse.")); </ins> export const listHighlightForeground = registerColor('list.highlightForeground', { dark: '#0097fb', light: '#0066BF', hc: focusBorder }, nls.localize('highlight', 'List/Tree foreground color of the match highlights when searching inside the list/tree.')); export const listInvalidItemForeground = registerColor('list.invalidItemForeground', { dark: '#B89500', light: '#B89500', hc: '#B89500' }, nls.localize('invalidItemForeground', 'List/Tree foreground color for invalid items, for example an unresolved root in explorer.')); export const listErrorForeground = registerColor('list.errorForeground', { dark: '#F88070', light: '#B01011', hc: null }, nls.localize('listErrorForeground', 'Foreground color of list items containing errors.'));


.pipe(jsFilter) .pipe(util.rewriteSourceMappingURL(sourceMappingURLBase)) .pipe(jsFilter.restore) <del> .pipe(createAsar(path.join(process.cwd(), 'node_modules'), ['**/*.node', '**/vscode-ripgrep/bin/*', '**/node-pty/build/Release/*', '**/*.wasm'], 'node_modules.asar')); </del> <ins> .pipe(createAsar(path.join(process.cwd(), 'node_modules'), [ '**/*.node', '**/vscode-ripgrep/bin/*', '**/node-pty/build/Release/*', '**/node-pty/lib/worker/conoutSocketWorker.js', '**/node-pty/lib/shared/conout.js', '**/*.wasm' ], 'node_modules.asar')); </ins> let all = es.merge( packageJsonStream,


"native-is-elevated": "0.4.3", "native-keymap": "2.2.1", "native-watchdog": "1.3.0", <del> "node-pty": "0.10.1", </del> <ins> "node-pty": "0.11.0-beta7", </ins> "nsfw": "2.1.2", "spdlog": "^0.13.0", "sudo-prompt": "9.2.1",


"jschardet": "3.0.0", "minimist": "^1.2.5", "native-watchdog": "1.3.0", <del> "node-pty": "0.10.1", </del> <ins> "node-pty": "0.11.0-beta7", </ins> "nsfw": "2.1.2", "spdlog": "^0.13.0", "tas-client-umd": "0.1.4",


resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.1.0.tgz#98b21931557466c6729e51cb77cd39c965f42239" integrity sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw== <del> node-pty@0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.10.1.tgz#cd05d03a2710315ec40221232ec04186f6ac2c6d" integrity sha512-JTdtUS0Im/yRsWJSx7yiW9rtpfmxqxolrtnyKwPLI+6XqTAPW/O2MjS8FYL4I5TsMbH2lVgDb2VMjp+9LoQGNg== </del> <ins> node-pty@0.11.0-beta7: version "0.11.0-beta7" resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.11.0-beta7.tgz#aed0888b5032d96c54d8473455e6adfae3bbebbe" integrity sha512-uApPGLglZRiHQcUMWakbZOrBo8HVWvhzIqNnrWvBGJOvc6m/S5lCdbbg93BURyJqHFmBS0GV+4hwiMNDuGRbSA== </ins> dependencies: nan "^2.14.0"


util "^0.11.0" vm-browserify "^1.0.1" <del> node-pty@0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.10.1.tgz#cd05d03a2710315ec40221232ec04186f6ac2c6d" integrity sha512-JTdtUS0Im/yRsWJSx7yiW9rtpfmxqxolrtnyKwPLI+6XqTAPW/O2MjS8FYL4I5TsMbH2lVgDb2VMjp+9LoQGNg== </del> <ins> node-pty@0.11.0-beta7: version "0.11.0-beta7" resolved "https://registry.yarnpkg.com/node-pty/-/node-pty-0.11.0-beta7.tgz#aed0888b5032d96c54d8473455e6adfae3bbebbe" integrity sha512-uApPGLglZRiHQcUMWakbZOrBo8HVWvhzIqNnrWvBGJOvc6m/S5lCdbbg93BURyJqHFmBS0GV+4hwiMNDuGRbSA== </ins> dependencies: nan "^2.14.0"


private _startBarrier: Barrier; private _persistentTerminalId: number; <ins> public get id(): number { return this._persistentTerminalId; } </ins> private _inReplay = false; constructor( <del> readonly id: number, </del> <ins> private readonly _instanceId: number, </ins> readonly shouldPersist: boolean, private readonly _shellLaunchConfig: IShellLaunchConfig, private readonly _activeWorkspaceRootUri: URI | undefined,


env: this._shellLaunchConfig.env }; <del> this._logService.trace('Spawning remote agent process', { terminalId: this.id, shellLaunchConfigDto }); </del> <ins> this._logService.trace('Spawning remote agent process', { terminalId: this._instanceId, shellLaunchConfigDto }); </ins> const result = await this._remoteTerminalChannel.createTerminalProcess( shellLaunchConfigDto,


this.onActiveTabChanged(() => isRemote ? this._updateRemoteState() : this._updateLocalState()); this.onActiveInstanceChanged(() => isRemote ? this._updateRemoteState() : this._updateLocalState()); this.onInstancesChanged(() => isRemote ? this._updateRemoteState() : this._updateLocalState()); <ins> // The state must be updated when the terminal is relaunched, otherwise the persistent // terminal ID will be stale and the process will be leaked. this.onInstanceProcessIdReady(() => isRemote ? this._updateRemoteState() : this._updateLocalState()); </ins> } public setNativeWindowsDelegate(delegate: ITerminalNativeWindowsDelegate): void {


terminals: instances.map(t => { return { relativeSize: isHorizontal ? t.cols / totalSize : t.rows / totalSize, <del> terminal: t.persistentTerminalId ? t.persistentTerminalId : t.id </del> <ins> terminal: t.persistentTerminalId || 0 </ins> }; }) };


"license": "MIT", "description": "Dependencies shared by all extensions", "dependencies": { <del> "typescript": "4.2.2" </del> <ins> "typescript": "4.2.3" </ins> }, "scripts": { "postinstall": "node ./postinstall"


resolved "https://registry.yarnpkg.com/fast-plist/-/fast-plist-0.1.2.tgz#a45aff345196006d406ca6cdcd05f69051ef35b8" integrity sha1-pFr/NFGWAG1AbKbNzQX2kFHvNbg= <del> typescript@4.2.2: version "4.2.2" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.2.tgz#1450f020618f872db0ea17317d16d8da8ddb8c4c" integrity sha512-tbb+NVrLfnsJy3M59lsDgrzWIflR4d4TIUjz+heUnHZwdF7YsrMTKoRERiIvI2lvBG95dfpLxB21WZhys1bgaQ== </del> <ins> typescript@4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== </ins> vscode-grammar-updater@^1.0.3: version "1.0.3"


import { NativeHostService } from 'vs/platform/native/electron-sandbox/nativeHostService'; import { getIconsStyleSheet } from 'vs/platform/theme/browser/iconsStyleSheet'; import { applyZoom, zoomIn, zoomOut } from 'vs/platform/window/electron-sandbox/window'; <ins> import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; </ins> const DEBUG_FLAGS_PATTERN = /s--(inspect|debug)(-brk|port)?=(d+)?/; const DEBUG_PORT_PATTERN = /s--(inspect|debug)-port=(d+)/;


this.tree.setInput({ processes: { processRoots } }); this.tree.layout(window.innerHeight, window.innerWidth); <ins> this.tree.onKeyDown(e => { const event = new StandardKeyboardEvent(e); if (event.keyCode === KeyCode.KeyE && event.altKey) { const selectionPids = this.getSelectedPids(); void Promise.all(selectionPids.map((pid) => this.nativeHostService.killProcess(pid, 'SIGTERM'))).then(() => this.tree?.refresh()); } }); </ins> this.tree.onContextMenu(e => { if (isProcessItem(e.element)) { this.showContextMenu(e.element, true);


label: localize('copy', "Copy"), click: () => { // Collect the selected pids <del> const selectionPids = this.tree?.getSelection()?.map(e => { if (!e || !('pid' in e)) { return undefined; } return e.pid; }).filter(e => !!e) as number[]; </del> <ins> const selectionPids = this.getSelectedPids(); </ins> // If the selection does not contain the right clicked item, copy the right clicked // item only. if (!selectionPids?.includes(pid)) {


} }, 200); } <ins> private getSelectedPids() { return this.tree?.getSelection()?.map(e => { if (!e || !('pid' in e)) { return undefined; } return e.pid; }).filter(e => !!e) as number[]; } </ins> } function createCodiconStyleSheet() {


constructor(@IStateService private stateService: IStateService, @IConfigurationService private configurationService: IConfigurationService) { super(); <ins> // System Theme this._register(this.configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration('window.systemColorTheme')) { this.updateSystemColorTheme(); } })); this.updateSystemColorTheme(); </ins> // Color Scheme changes <del> nativeTheme.on('updated', () => { this._onDidChangeColorScheme.fire(this.getColorScheme()); }); </del> <ins> this._register(Event.fromNodeEventEmitter(nativeTheme, 'updated')(() => this._onDidChangeColorScheme.fire(this.getColorScheme()))); } private updateSystemColorTheme(): void { switch (this.configurationService.getValue<'default' | 'auto' | 'light' | 'dark'>('window.systemColorTheme')) { case 'dark': nativeTheme.themeSource = 'dark'; break; case 'light': nativeTheme.themeSource = 'light'; break; case 'auto': switch (this.getBaseTheme()) { case 'vs': nativeTheme.themeSource = 'light'; break; case 'vs-dark': nativeTheme.themeSource = 'dark'; break; default: nativeTheme.themeSource = 'system'; } break; default: nativeTheme.themeSource = 'system'; break; } </ins> } getColorScheme(): IColorScheme {


let background = this.stateService.getItem<string | null>(THEME_BG_STORAGE_KEY, null); if (!background) { <del> const baseTheme = this.stateService.getItem<string>(THEME_STORAGE_KEY, 'vs-dark').split(' ')[0]; switch (baseTheme) { </del> <ins> switch (this.getBaseTheme()) { </ins> case 'vs': background = DEFAULT_BG_LIGHT; break; case 'hc-black': background = DEFAULT_BG_HC_BLACK; break; case 'hc-light': background = DEFAULT_BG_HC_LIGHT; break;


return background; } <ins> private getBaseTheme(): 'vs' | 'vs-dark' | 'hc-black' | 'hc-light' { const baseTheme = this.stateService.getItem<string>(THEME_STORAGE_KEY, 'vs-dark').split(' ')[0]; switch (baseTheme) { case 'vs': return 'vs'; case 'hc-black': return 'hc-black'; case 'hc-light': return 'hc-light'; default: return 'vs-dark'; } } </ins> saveWindowSplash(windowId: number | undefined, splash: IPartsSplash): void { // Update in storage


if (typeof windowId === 'number') { this.updateBackgroundColor(windowId, splash); } <ins> // Update system theme this.updateSystemColorTheme(); </ins> } private updateBackgroundColor(windowId: number, splash: IPartsSplash): void {


<ins> /*--------------------------------------------------------------------------------------------- *  Copyright (c) Microsoft Corporation. All rights reserved. *  Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { localize } from 'vs/nls'; import { Registry } from 'vs/platform/registry/common/platform'; import { IConfigurationRegistry, Extensions as ConfigurationExtensions, ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry'; import { isLinux } from 'vs/base/common/platform'; const configurationRegistry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Configuration); configurationRegistry.registerConfiguration({ 'properties': { 'window.systemColorTheme': { 'type': 'string', 'enum': ['default', 'auto', 'light', 'dark'], 'enumDescriptions': [ localize('window.systemColorTheme.default', "System color theme matches the configured OS theme."), localize('window.systemColorTheme.auto', "Enforce a light system color theme when a light workbench color theme is configured and the same for configured dark workbench color themes."), localize('window.systemColorTheme.light', "Enforce a light system color theme."), localize('window.systemColorTheme.dark', "Enforce a dark system color theme."), ], 'markdownDescription': localize('window.systemColorTheme', "The system color theme applies to native UI elements such as native dialogs, menus and title bar. Even if your OS is configured in light appearance mode, you can select a dark system color theme for the window. You can also configure to automatically adjust based on the `#workbench.colorTheme#` setting."), 'default': 'default', 'included': !isLinux, // not supported on Linux (https://github.com/electron/electron/issues/28887) 'scope': ConfigurationScope.APPLICATION } } }); </ins>


// Terminal import 'vs/workbench/contrib/terminal/electron-sandbox/terminal.contribution'; <del> // Themes Support </del> <ins> // Themes </ins> import 'vs/workbench/contrib/themes/browser/themes.test.contribution'; <ins> import 'vs/workbench/services/themes/electron-sandbox/themes.contribution'; </ins> // User Data Sync import 'vs/workbench/contrib/userDataSync/electron-sandbox/userDataSync.contribution';


position: absolute; pointer-events: none; z-index: 1; <del> padding: 2px 6px 3px 6px; </del> <ins> padding: 3px 6px; </ins> box-sizing: border-box; width: 100%; overflow: hidden;


const shell = this._terminalService.getDefaultShell(true, configProvider); const shellArgs = this._terminalService.getDefaultShellArgs(true, configProvider); <ins> const terminalName = args.title || nls.localize('debug.terminal.title', "Debug Process"); </ins> const shellConfig = JSON.stringify({ shell, shellArgs }); <del> let terminal = await this._integratedTerminalInstances.checkout(shellConfig); </del> <ins> let terminal = await this._integratedTerminalInstances.checkout(shellConfig, terminalName); </ins> let cwdForPrepareCommand: string | undefined; let giveShellTimeToInitialize = false;


shellPath: shell, shellArgs: shellArgs, cwd: args.cwd, <del> name: args.title || nls.localize('debug.terminal.title', "debuggee"), </del> <ins> name: terminalName, </ins> }; giveShellTimeToInitialize = true; terminal = this._terminalService.createTerminalFromOptions(options, true);


private _terminalInstances = new Map<vscode.Terminal, { lastUsedAt: number, config: string }>(); <del> public async checkout(config: string) { </del> <ins> public async checkout(config: string, name: string) { </ins> const entries = [...this._terminalInstances.entries()]; const promises = entries.map(([terminal, termInfo]) => createCancelablePromise(async ct => { <ins> // Only allow terminals that match the title.  See #123189 if (terminal.name !== name) { return null; } </ins> if (termInfo.lastUsedAt !== -1 && await hasChildProcesses(await terminal.processId)) { return null; }


} if (envVars) { <del> for (let key in envVars) { const value = envVars[key]; </del> <ins> // merge environment variables into a copy of the process.env const env = Object.assign({}, getSanitizedEnvironment(process), envVars); for (let key in env) { const value = env[key]; </ins> if (value === null) { osaArgs.push('-u'); osaArgs.push(key);


if (cwd) { args.push(cwd); } <del> const child = spawner.spawn('/usr/bin/open', args); </del> <ins> const env = getSanitizedEnvironment(process); const child = spawner.spawn('/usr/bin/open', args, { cwd, env }); </ins> child.on('error', e); child.on('exit', () => c()); });


const bashCommand = `${quote(args)}; echo; read -p "${LinuxExternalTerminalService.WAIT_MESSAGE}" -n1;`; termArgs.push(`''${bashCommand}''`);	// wrapping argument in two sets of ' because node is so "friendly" that it removes one set... // merge environment variables into a copy of the process.env <del> const env = Object.assign({}, process.env, envVars); </del> <ins> const env = Object.assign({}, getSanitizedEnvironment(process), envVars); </ins> // delete environment variables that have a null value Object.keys(env).filter(v => env[v] === null).forEach(key => delete env[key]);


// Update workspace trust this._trustState.isTrusted = trusted; <ins> // Reset acceptsOutOfWorkspaceFiles if (!trusted) { this._trustState.acceptsOutOfWorkspaceFiles = false; } </ins> // Run workspace trust transition participants await this._trustTransitionManager.participate(trusted);


set isTrusted(value: boolean | undefined) { this._mementoObject[this._isTrustedKey] = value; <del> if (!value) { this._mementoObject[this._acceptsOutOfWorkspaceFilesKey] = value; } </del> this._memento.saveMemento(); } }


} .monaco-workbench.web { <del> touch-action: initial; /* reenable touch events on workbench */ </del> <ins> touch-action: none; /* Disable browser handling of all panning and zooming gestures. Removes 300ms touch delay. */ </ins> } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


function onValue(value: any) { if (Array.isArray(currentParent)) { (<any[]>currentParent).push(value); <del> } else if (currentProperty) { </del> <ins> } else if (currentProperty !== null) { </ins> currentParent[currentProperty] = value; } }


assert.deepStrictEqual(testObject.configurationModel.keys, []); }); <ins> test('Test empty property is not ignored', () => { const testObject = new ConfigurationModelParser('test'); testObject.parse(JSON.stringify({ '': 1 })); // deepStrictEqual seems to ignore empty properties, fall back // to comparing the output of JSON.stringify assert.strictEqual(JSON.stringify(testObject.configurationModel.contents), JSON.stringify({ '': 1 })); assert.deepStrictEqual(testObject.configurationModel.keys, ['']); }); </ins> test('Test registering the same property again', () => { Registry.as<IConfigurationRegistry>(Extensions.Configuration).registerConfiguration({ 'id': 'a',


} /** <ins> * Register an inlay hints provider. */ export function registerInlayHintsProvider(languageId: string, provider: modes.InlayHintsProvider): IDisposable { return modes.InlayHintsProviderRegistry.register(languageId, provider); } /** </ins> * Contains additional diagnostic information about the context in which * a [code action](#CodeActionProvider.provideCodeActions) is run. */


registerDocumentSemanticTokensProvider: <any>registerDocumentSemanticTokensProvider, registerDocumentRangeSemanticTokensProvider: <any>registerDocumentRangeSemanticTokensProvider, registerInlineCompletionsProvider: <any>registerInlineCompletionsProvider, <ins> registerInlayHintsProvider: <any>registerInlayHintsProvider, </ins> // enums DocumentHighlightKind: standaloneEnums.DocumentHighlightKind,


export function registerInlineCompletionsProvider(languageId: string, provider: InlineCompletionsProvider): IDisposable; /** <ins> * Register an inlay hints provider. */ export function registerInlayHintsProvider(languageId: string, provider: InlayHintsProvider): IDisposable; /** </ins> * Contains additional diagnostic information about the context in which * a [code action](#CodeActionProvider.provideCodeActions) is run. */


disposables.push(server.onServerStart(path => { <del> defaultStatus.text = '$(flame) Runnning'; </del> <ins> defaultStatus.text = '$(flame) Running'; </ins> defaultStatus.command = 'o.pickProjectAndStart'; defaultStatus.color = ''; render();


if (args.unit === EditorScroll_.Unit.Line) { // scrolling by model lines <del> const visibleViewRange = viewModel.getCompletelyVisibleViewRange(); </del> <ins> const futureViewport = viewModel.viewLayout.getFutureViewport(); const visibleViewRange = viewModel.getCompletelyVisibleViewRangeAtScrollTop(futureViewport.top); </ins> const visibleModelRange = viewModel.coordinatesConverter.convertViewRangeToModelRange(visibleViewRange); let desiredTopModelLineNumber: number;