Skip to content

Commit 372a8f1

Browse files
author
Akash Satheesan
committed
Squashed 'lib/vscode/' changes from 631dbe250bc..cfa2e218100
cfa2e218100 Make sure we actually update the local resource roots (#122957) 206524cbf6f Merge pull request #122941 from microsoft/roblou/fix122701 0ce07162f07 Use the scoped context key service for notebook editor context keys Fix #122701 4fbe56e36b3 Merge pull request #122933 from microsoft/aeschli/122466 32a743d2af9 [JSON] Schema not found error on opening package.json. For #122279 0676e9a727e Fix port theme color typo (#122915) 85f8ebf1687 Fix context on LabelTunnelAction (#122856) 5913f53cab5 Block windows/iframes from preventing the unload (#122835) (#122869) acd78c82ac6 Ensure that notebook cell URIs work (#122747) 4e185d89863 Merge pull request #122764 from microsoft/roblou/fix122407 7eb7814b56c Try to block webviews from cancelling unloads (#122758) 25092105030 Hardcode keybinding string to fix #122407 b084e6f4a73 Fix currently active indicator preventing editor switching (#122742) bc2373aaa54 Merge pull request #122732 from microsoft/r156_tabs d7a86f269a8 Disable tabs by default git-subtree-dir: lib/vscode git-subtree-split: cfa2e218100323074ac1948c885448fdf4de2a7f
1 parent a631d19 commit 372a8f1

File tree

25 files changed

+110
-81
lines changed

25 files changed

+110
-81
lines changed

lib/vscode/extensions/json-language-features/server/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"dependencies": {
1515
"jsonc-parser": "^3.0.0",
1616
"request-light": "^0.4.0",
17-
"vscode-json-languageservice": "^4.1.2",
17+
"vscode-json-languageservice": "^4.1.3",
1818
"vscode-languageserver": "^7.0.0",
1919
"vscode-uri": "^3.0.2"
2020
},

lib/vscode/extensions/json-language-features/server/yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@ request-light@^0.4.0:
105105
https-proxy-agent "^2.2.4"
106106
vscode-nls "^4.1.2"
107107

108-
vscode-json-languageservice@^4.1.2:
109-
version "4.1.2"
110-
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-4.1.2.tgz#c3873f791e23488a8b373e02c85c232bd625e27a"
111-
integrity sha512-atAz6m4UZCslB7yk03Qb3/MKn1E5l07063syAEUfKRcVKTVN3t1+/KDlGu1nVCRUFAgz5+18gKidQvO4PVPLdg==
108+
vscode-json-languageservice@^4.1.3:
109+
version "4.1.3"
110+
resolved "https://registry.yarnpkg.com/vscode-json-languageservice/-/vscode-json-languageservice-4.1.3.tgz#851564e529e649c13b844f10a80ea1d9095591a9"
111+
integrity sha512-m/wUEt4zgCNUcvGmPr1ELo+ROQNKBgASpdOOAEpcSMwYE/6GzULZ1KfBhbX9or7qnC4E0oX+wwW+lrN3EUWCgw==
112112
dependencies:
113113
jsonc-parser "^3.0.0"
114114
minimatch "^3.0.4"

lib/vscode/extensions/theme-abyss/themes/abyss-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,7 @@
363363
// "peekViewTitleDescription.foreground": "",
364364

365365
// Ports
366-
"ports.iconRunningProcessforeground": "#80a2c2",
366+
"ports.iconRunningProcessForeground": "#80a2c2",
367367
// Editor: Diff
368368
"diffEditor.insertedTextBackground": "#31958A55",
369369
// "diffEditor.insertedTextBorder": "",

lib/vscode/extensions/theme-defaults/themes/dark_vs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"menu.foreground": "#CCCCCC",
1717
"statusBarItem.remoteForeground": "#FFF",
1818
"statusBarItem.remoteBackground": "#16825D",
19-
"ports.iconRunningProcessforeground": "#369432",
19+
"ports.iconRunningProcessForeground": "#369432",
2020
"sideBarSectionHeader.background": "#0000",
2121
"sideBarSectionHeader.border": "#ccc3",
2222
"tab.lastPinnedBorder": "#ccc3"

lib/vscode/extensions/theme-defaults/themes/hc_black.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"selection.background": "#008000",
1111
"editor.selectionBackground": "#FFFFFF",
1212
"statusBarItem.remoteBackground": "#00000000",
13-
"ports.iconRunningProcessforeground": "#FFFFFF"
13+
"ports.iconRunningProcessForeground": "#FFFFFF"
1414
},
1515
"tokenColors": [
1616
{

lib/vscode/extensions/theme-defaults/themes/light_vs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"settings.numberInputBorder": "#CECECE",
1919
"statusBarItem.remoteForeground": "#FFF",
2020
"statusBarItem.remoteBackground": "#16825D",
21-
"ports.iconRunningProcessforeground": "#369432",
21+
"ports.iconRunningProcessForeground": "#369432",
2222
"sideBarSectionHeader.background": "#0000",
2323
"sideBarSectionHeader.border": "#61616130",
2424
"tab.lastPinnedBorder": "#61616130",

lib/vscode/extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"statusBar.debuggingBackground": "#423523",
3030
"statusBar.noFolderBackground": "#423523",
3131
"statusBarItem.remoteBackground": "#6e583b",
32-
"ports.iconRunningProcessforeground": "#369432",
32+
"ports.iconRunningProcessForeground": "#369432",
3333
"activityBar.background": "#221a0f",
3434
"activityBar.foreground": "#d3af86",
3535
"sideBar.background": "#362712",

lib/vscode/extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"editor.lineHighlightBackground": "#303030",
1717
"editorLineNumber.activeForeground": "#949494",
1818
"editor.wordHighlightBackground": "#4747a180",
19-
"editor.wordHighlightStrongBackground": "#6767ce80",
19+
"editor.wordHighlightStrongBackground": "#6767ce80",
2020
"editorCursor.foreground": "#c07020",
2121
"editorWhitespace.foreground": "#505037",
2222
"editorIndentGuide.background": "#505037",
@@ -33,7 +33,7 @@
3333
"statusBar.noFolderBackground": "#505050",
3434
"titleBar.activeBackground": "#505050",
3535
"statusBarItem.remoteBackground": "#3655b5",
36-
"ports.iconRunningProcessforeground": "#CCCCCC",
36+
"ports.iconRunningProcessForeground": "#CCCCCC",
3737
"activityBar.background": "#353535",
3838
"activityBar.foreground": "#ffffff",
3939
"activityBarBadge.background": "#3655b5",

lib/vscode/extensions/theme-monokai/themes/monokai-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"statusBar.noFolderBackground": "#414339",
5252
"statusBar.debuggingBackground": "#75715E",
5353
"statusBarItem.remoteBackground": "#AC6218",
54-
"ports.iconRunningProcessforeground": "#ccccc7",
54+
"ports.iconRunningProcessForeground": "#ccccc7",
5555
"activityBar.background": "#272822",
5656
"activityBar.foreground": "#f8f8f2",
5757
"sideBar.background": "#1e1f1c",

lib/vscode/extensions/theme-quietlight/themes/quietlight-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@
506506
"statusBar.noFolderBackground": "#705697",
507507
"statusBar.debuggingBackground": "#705697",
508508
"statusBarItem.remoteBackground": "#4e3c69",
509-
"ports.iconRunningProcessforeground": "#749351",
509+
"ports.iconRunningProcessForeground": "#749351",
510510
"activityBar.background": "#EDEDF5",
511511
"activityBar.foreground": "#705697",
512512
"activityBarBadge.background": "#705697",

lib/vscode/extensions/theme-red/themes/Red-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"statusBar.background": "#700000",
1111
"statusBar.noFolderBackground": "#700000",
1212
"statusBarItem.remoteBackground": "#c33",
13-
"ports.iconRunningProcessforeground": "#DB7E58",
13+
"ports.iconRunningProcessForeground": "#DB7E58",
1414
"editorGroupHeader.tabsBackground": "#330000",
1515
"titleBar.activeBackground": "#770000",
1616
"titleBar.inactiveBackground": "#772222",

lib/vscode/extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@
462462
"statusBar.debuggingBackground": "#00212B",
463463
"statusBar.noFolderBackground": "#00212B",
464464
"statusBarItem.remoteBackground": "#2AA19899",
465-
"ports.iconRunningProcessforeground": "#369432",
465+
"ports.iconRunningProcessForeground": "#369432",
466466
"statusBarItem.prominentBackground": "#003847",
467467
"statusBarItem.prominentHoverBackground": "#003847",
468468
// "statusBarItem.activeBackground": "",

lib/vscode/extensions/theme-solarized-light/themes/solarized-light-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -465,7 +465,7 @@
465465
"statusBar.noFolderBackground": "#EEE8D5",
466466
// "statusBar.foreground": "",
467467
"statusBarItem.remoteBackground": "#AC9D57",
468-
"ports.iconRunningProcessforeground": "#2AA19899",
468+
"ports.iconRunningProcessForeground": "#2AA19899",
469469
"statusBarItem.prominentBackground": "#DDD6C1",
470470
"statusBarItem.prominentHoverBackground": "#DDD6C199",
471471
// "statusBarItem.activeBackground": "",

lib/vscode/extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"titleBar.activeBackground": "#001126",
3333
"statusBar.background": "#001126",
3434
"statusBarItem.remoteBackground": "#0e639c",
35-
"ports.iconRunningProcessforeground": "#bbdaff",
35+
"ports.iconRunningProcessForeground": "#bbdaff",
3636
"statusBar.noFolderBackground": "#001126",
3737
"statusBar.debuggingBackground": "#001126",
3838
"activityBar.background": "#001733",

lib/vscode/src/vs/base/test/common/glob.test.ts

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import * as assert from 'assert';
77
import * as glob from 'vs/base/common/glob';
88
import { sep } from 'vs/base/common/path';
99
import { isWindows } from 'vs/base/common/platform';
10+
import { URI } from 'vs/base/common/uri';
1011

1112
suite('Glob', () => {
1213

@@ -1019,4 +1020,9 @@ suite('Glob', () => {
10191020
assertNoGlobMatch(p, '/DNXConsoleApp/foo/Program.cs');
10201021
}
10211022
});
1023+
1024+
test('URI match', () => {
1025+
let p = 'scheme:/**/*.md';
1026+
assertGlobMatch(p, URI.file('super/duper/long/some/file.md').with({ scheme: 'scheme' }).toString());
1027+
});
10221028
});

lib/vscode/src/vs/platform/windows/electron-main/window.ts

+9
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,15 @@ export class CodeWindow extends Disposable implements ICodeWindow {
424424
this._win.webContents.on('render-process-gone', (event, details) => this.onWindowError(WindowError.CRASHED, details));
425425
this._win.webContents.on('did-fail-load', (event, errorCode, errorDescription) => this.onWindowError(WindowError.LOAD, errorDescription));
426426

427+
// Prevent windows/iframes from blocking the unload
428+
// through DOM events. We have our own logic for
429+
// unloading a window that should not be confused
430+
// with the DOM way.
431+
// (https://github.com/microsoft/vscode/issues/122736)
432+
this._win.webContents.on('will-prevent-unload', event => {
433+
event.preventDefault();
434+
});
435+
427436
// Window close
428437
this._win.on('closed', () => {
429438
this._onDidClose.fire();

lib/vscode/src/vs/workbench/contrib/notebook/browser/contrib/statusBar/statusBarProviders.ts

+9-18
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,21 @@
33
* Licensed under the MIT License. See License.txt in the project root for license information.
44
*--------------------------------------------------------------------------------------------*/
55

6-
import { localize } from 'vs/nls';
76
import { CancellationToken } from 'vs/base/common/cancellation';
87
import { Disposable } from 'vs/base/common/lifecycle';
8+
import { isWindows } from 'vs/base/common/platform';
99
import { URI } from 'vs/base/common/uri';
10+
import { IModeService } from 'vs/editor/common/services/modeService';
11+
import { localize } from 'vs/nls';
1012
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
1113
import { Registry } from 'vs/platform/registry/common/platform';
1214
import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
15+
import { CHANGE_CELL_LANGUAGE } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
1316
import { INotebookCellStatusBarService } from 'vs/workbench/contrib/notebook/common/notebookCellStatusBarService';
1417
import { CellKind, CellStatusbarAlignment, INotebookCellStatusBarItem, INotebookCellStatusBarItemList, INotebookCellStatusBarItemProvider } from 'vs/workbench/contrib/notebook/common/notebookCommon';
18+
import { NotebookSelector } from 'vs/workbench/contrib/notebook/common/notebookSelector';
1519
import { INotebookService } from 'vs/workbench/contrib/notebook/common/notebookService';
1620
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
17-
import { IModeService } from 'vs/editor/common/services/modeService';
18-
import { CHANGE_CELL_LANGUAGE, EXECUTE_CELL_COMMAND_ID, QUIT_EDIT_CELL_COMMAND_ID } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
19-
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
20-
import { NotebookSelector } from 'vs/workbench/contrib/notebook/common/notebookSelector';
2121

2222
class CellStatusBarPlaceholderProvider implements INotebookCellStatusBarItemProvider {
2323
readonly selector: NotebookSelector = {
@@ -26,7 +26,6 @@ class CellStatusBarPlaceholderProvider implements INotebookCellStatusBarItemProv
2626

2727
constructor(
2828
@INotebookService private readonly _notebookService: INotebookService,
29-
@IKeybindingService private readonly _keybindingService: IKeybindingService,
3029
) { }
3130

3231
async provideCellStatusBarItems(uri: URI, index: number, token: CancellationToken): Promise<INotebookCellStatusBarItemList | undefined> {
@@ -38,19 +37,11 @@ class CellStatusBarPlaceholderProvider implements INotebookCellStatusBarItemProv
3837

3938
let text: string;
4039
if (cell.cellKind === CellKind.Code) {
41-
const keybinding = this._keybindingService.lookupKeybinding(EXECUTE_CELL_COMMAND_ID)?.getLabel();
42-
if (!keybinding) {
43-
return;
44-
}
45-
46-
text = localize('notebook.cell.status.codeExecuteTip', "Press {0} to execute cell", keybinding);
40+
text = isWindows ?
41+
localize('notebook.cell.status.codeExecuteTipWin', "Press Ctrl+Alt+Enter to execute cell") :
42+
localize('notebook.cell.status.codeExecuteTipNotWin', "Press Ctrl+Enter to execute cell");
4743
} else {
48-
const keybinding = this._keybindingService.lookupKeybinding(QUIT_EDIT_CELL_COMMAND_ID)?.getLabel();
49-
if (!keybinding) {
50-
return;
51-
}
52-
53-
text = localize('notebook.cell.status.markdownExecuteTip', "Press {0} to stop editing", keybinding);
44+
text = localize('notebook.cell.status.markdownExecuteTip', "Press Escape to stop editing");
5445
}
5546

5647
const item = <INotebookCellStatusBarItem>{

lib/vscode/src/vs/workbench/contrib/notebook/browser/notebookEditorWidget.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ export class NotebookEditorWidget extends Disposable implements INotebookEditor
334334
this.scopedContextKeyService = contextKeyService.createScoped(this._overlayContainer);
335335
this.instantiationService = instantiationService.createChild(new ServiceCollection([IContextKeyService, this.scopedContextKeyService]));
336336

337-
this._register(instantiationService.createInstance(NotebookEditorContextKeys, this));
337+
this._register(this.instantiationService.createInstance(NotebookEditorContextKeys, this));
338338

339-
this._kernelManger = instantiationService.createInstance(NotebookEditorKernelManager);
339+
this._kernelManger = this.instantiationService.createInstance(NotebookEditorKernelManager);
340340
this._register(notebookKernelService.onDidChangeNotebookKernelBinding(e => {
341341
if (isEqual(e.notebook, this.viewModel?.uri)) {
342342
this._loadKernelPreloads();

lib/vscode/src/vs/workbench/contrib/notebook/browser/notebookServiceImpl.ts

+47-33
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,10 @@ import { Lazy } from 'vs/base/common/lazy';
3737
import { IResourceEditorInput } from 'vs/platform/editor/common/editor';
3838
import { NotebookDiffEditorInput } from 'vs/workbench/contrib/notebook/browser/notebookDiffEditorInput';
3939
import { NotebookEditorInput } from 'vs/workbench/contrib/notebook/common/notebookEditorInput';
40-
import { ContributedEditorPriority, IEditorAssociationsRegistry, IEditorOverrideService, IEditorType, IEditorTypesHandler } from 'vs/workbench/services/editor/common/editorOverrideService';
41-
import { EditorExtensions } from 'vs/workbench/common/editor';
40+
import { ContributedEditorPriority, DiffEditorInputFactoryFunction, EditorInputFactoryFunction, IEditorAssociationsRegistry, IEditorOverrideService, IEditorType, IEditorTypesHandler } from 'vs/workbench/services/editor/common/editorOverrideService';
41+
import { EditorExtensions, IEditorInput } from 'vs/workbench/common/editor';
4242
import { IFileService } from 'vs/platform/files/common/files';
43+
import { DiffEditorInput } from 'vs/workbench/common/editor/diffEditorInput';
4344

4445
export class NotebookProviderInfoStore extends Disposable {
4546

@@ -129,39 +130,52 @@ export class NotebookProviderInfoStore extends Disposable {
129130
private _registerContributionPoint(notebookProviderInfo: NotebookProviderInfo): void {
130131
for (const selector of notebookProviderInfo.selectors) {
131132
const globPattern = (selector as INotebookExclusiveDocumentFilter).include || selector as glob.IRelativePattern | string;
133+
const notebookEditorInfo = {
134+
id: notebookProviderInfo.id,
135+
label: notebookProviderInfo.displayName,
136+
detail: notebookProviderInfo.providerDisplayName,
137+
describes: (currentEditor: IEditorInput) => currentEditor instanceof NotebookEditorInput && currentEditor.viewType === notebookProviderInfo.id,
138+
priority: notebookProviderInfo.exclusive ? ContributedEditorPriority.exclusive : notebookProviderInfo.priority,
139+
};
140+
const notebookEditorOptions = {
141+
canHandleDiff: () => !!this._configurationService.getValue(NotebookTextDiffEditorPreview) && !this._accessibilityService.isScreenReaderOptimized(),
142+
canSupportResource: (resource: URI) => resource.scheme === Schemas.untitled || resource.scheme === Schemas.vscodeNotebookCell || this._fileService.canHandleResource(resource)
143+
};
144+
const notebookEditorInputFactory: EditorInputFactoryFunction = (resource, options, group) => {
145+
const data = CellUri.parse(resource);
146+
let notebookUri: URI = resource;
147+
let cellOptions: IResourceEditorInput | undefined;
148+
149+
if (data) {
150+
notebookUri = data.notebook;
151+
cellOptions = { resource: resource };
152+
}
153+
154+
const notebookOptions = new NotebookEditorOptions({ ...options, cellOptions });
155+
return { editor: NotebookEditorInput.create(this._instantiationService, notebookUri, notebookProviderInfo.id), options: notebookOptions };
156+
};
157+
const notebookEditorDiffFactory: DiffEditorInputFactoryFunction = (diffEditorInput: DiffEditorInput, options, group) => {
158+
const modifiedInput = diffEditorInput.modifiedInput;
159+
const originalInput = diffEditorInput.originalInput;
160+
const notebookUri = modifiedInput.resource!;
161+
const originalNotebookUri = originalInput.resource!;
162+
return { editor: NotebookDiffEditorInput.create(this._instantiationService, notebookUri, modifiedInput.getName(), originalNotebookUri, originalInput.getName(), diffEditorInput.getName(), notebookProviderInfo.id) };
163+
};
164+
// Register the notebook editor
132165
this._contributedEditorDisposables.add(this._editorOverrideService.registerContributionPoint(
133166
globPattern,
134-
{
135-
id: notebookProviderInfo.id,
136-
label: notebookProviderInfo.displayName,
137-
detail: notebookProviderInfo.providerDisplayName,
138-
describes: (currentEditor) => currentEditor instanceof NotebookEditorInput && currentEditor.viewType === notebookProviderInfo.id,
139-
priority: notebookProviderInfo.exclusive ? ContributedEditorPriority.exclusive : notebookProviderInfo.priority,
140-
},
141-
{
142-
canHandleDiff: () => !!this._configurationService.getValue(NotebookTextDiffEditorPreview) && !this._accessibilityService.isScreenReaderOptimized(),
143-
canSupportResource: resource => resource.scheme === Schemas.untitled || resource.scheme === Schemas.vscodeNotebookCell || this._fileService.canHandleResource(resource)
144-
},
145-
(resource, options, group) => {
146-
const data = CellUri.parse(resource);
147-
let notebookUri: URI = resource;
148-
let cellOptions: IResourceEditorInput | undefined;
149-
150-
if (data) {
151-
notebookUri = data.notebook;
152-
cellOptions = { resource: resource };
153-
}
154-
155-
const notebookOptions = new NotebookEditorOptions({ ...options, cellOptions });
156-
return { editor: NotebookEditorInput.create(this._instantiationService, notebookUri, notebookProviderInfo.id), options: notebookOptions };
157-
},
158-
(diffEditorInput, group) => {
159-
const modifiedInput = diffEditorInput.modifiedInput;
160-
const originalInput = diffEditorInput.originalInput;
161-
const notebookUri = modifiedInput.resource!;
162-
const originalNotebookUri = originalInput.resource!;
163-
return { editor: NotebookDiffEditorInput.create(this._instantiationService, notebookUri, modifiedInput.getName(), originalNotebookUri, originalInput.getName(), diffEditorInput.getName(), notebookProviderInfo.id) };
164-
}
167+
notebookEditorInfo,
168+
notebookEditorOptions,
169+
notebookEditorInputFactory,
170+
notebookEditorDiffFactory
171+
));
172+
// Then register the schema handler as exclusive for that notebook
173+
this._contributedEditorDisposables.add(this._editorOverrideService.registerContributionPoint(
174+
`${Schemas.vscodeNotebookCell}:/**/${globPattern}`,
175+
{ ...notebookEditorInfo, priority: ContributedEditorPriority.exclusive },
176+
notebookEditorOptions,
177+
notebookEditorInputFactory,
178+
notebookEditorDiffFactory
165179
));
166180
}
167181
}

lib/vscode/src/vs/workbench/contrib/remote/browser/tunnelView.ts

+7-3
Original file line numberDiff line numberDiff line change
@@ -965,10 +965,14 @@ namespace LabelTunnelAction {
965965
export const LABEL = nls.localize('remote.tunnel.label', "Set Port Label");
966966
export const COMMAND_ID_KEYWORD = 'label';
967967

968+
function isITunnelItem(item: any): item is ITunnelItem {
969+
return item && item.tunnelType && item.remoteHost && item.source;
970+
}
971+
968972
export function handler(): ICommandHandler {
969973
return async (accessor, arg): Promise<{ port: number, label: string } | undefined> => {
970-
const context = (arg !== undefined || arg instanceof TunnelItem) ? arg : accessor.get(IContextKeyService).getContextKeyValue(TunnelViewSelectionKeyName);
971-
if (context instanceof TunnelItem) {
974+
const context = isITunnelItem(arg) ? arg : accessor.get(IContextKeyService).getContextKeyValue<ITunnelItem | undefined>(TunnelViewSelectionKeyName);
975+
if (context) {
972976
return new Promise(resolve => {
973977
const remoteExplorerService = accessor.get(IRemoteExplorerService);
974978
const startingValue = context.name ? context.name : `${context.remotePort}`;
@@ -1563,7 +1567,7 @@ MenuRegistry.appendMenuItem(MenuId.TunnelLocalAddressInline, ({
15631567
ContextKeyExpr.or(TunnelTypeContextKey.isEqualTo(TunnelType.Forwarded), TunnelTypeContextKey.isEqualTo(TunnelType.Detected)))
15641568
}));
15651569

1566-
export const portWithRunningProcessForeground = registerColor('ports.iconRunningProcessforeground', {
1570+
export const portWithRunningProcessForeground = registerColor('ports.iconRunningProcessForeground', {
15671571
light: STATUS_BAR_HOST_NAME_BACKGROUND,
15681572
dark: STATUS_BAR_HOST_NAME_BACKGROUND,
15691573
hc: STATUS_BAR_HOST_NAME_BACKGROUND

lib/vscode/src/vs/workbench/contrib/terminal/common/terminalConfiguration.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ export const terminalConfiguration: IConfigurationNode = {
286286
'terminal.integrated.tabs.enabled': {
287287
description: localize('terminal.integrated.tabs.enabled', 'Controls whether terminal tabs display as a list to the side of the terminal. When this is disabled a dropdown will display instead.'),
288288
type: 'boolean',
289-
default: true,
289+
default: false,
290290
},
291291
'terminal.integrated.tabs.hideCondition': {
292292
description: localize('terminal.integrated.tabs.hideCondition', 'Controls whether the terminal tabs view will hide under certain conditions.'),

lib/vscode/src/vs/workbench/contrib/webview/browser/baseWebviewElement.ts

+5-2
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,11 @@ export abstract class BaseWebview<T extends HTMLElement> extends Disposable {
372372
});
373373
}
374374

375-
public set localResourcesRoot(resources: URI[]) {
376-
/** no op */
375+
public set localResourcesRoot(resources: readonly URI[]) {
376+
this.content = {
377+
...this.content,
378+
options: { ...this.content.options, localResourceRoots: resources }
379+
};
377380
}
378381

379382
public set state(state: string | undefined) {

0 commit comments

Comments
 (0)