From 9acd6142170010dea945cd1e8292b5202fcc5e71 Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Fri, 8 Dec 2023 18:08:12 +0100 Subject: [PATCH 1/5] Fixes #191065 --- src/vs/editor/common/model/tokenizationTextModelPart.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/editor/common/model/tokenizationTextModelPart.ts b/src/vs/editor/common/model/tokenizationTextModelPart.ts index 27658b9db64..f03d0bc60a4 100644 --- a/src/vs/editor/common/model/tokenizationTextModelPart.ts +++ b/src/vs/editor/common/model/tokenizationTextModelPart.ts @@ -463,7 +463,7 @@ class GrammarTokens extends Disposable { if (tokenizationSupport && tokenizationSupport.createBackgroundTokenizer && !tokenizationSupport.backgroundTokenizerShouldOnlyVerifyTokens) { this._backgroundTokenizer.value = tokenizationSupport.createBackgroundTokenizer(this._textModel, b); } - if (!this._backgroundTokenizer.value) { + if (!this._backgroundTokenizer.value && !this._textModel.isTooLargeForTokenization()) { this._backgroundTokenizer.value = this._defaultBackgroundTokenizer = new DefaultBackgroundTokenizer(this._tokenizer, b); this._defaultBackgroundTokenizer.handleChanges(); From 0b8478b79030c2e2b1b9b585ccc8a355d69f0b0c Mon Sep 17 00:00:00 2001 From: Henning Dieterichs Date: Fri, 8 Dec 2023 19:03:47 +0100 Subject: [PATCH 2/5] Fixes #172183 --- .../browser/inlineCompletionsHintsWidget.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.ts b/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.ts index 36e9490de7c..5229bc11df2 100644 --- a/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.ts +++ b/src/vs/editor/contrib/inlineCompletions/browser/inlineCompletionsHintsWidget.ts @@ -287,6 +287,10 @@ class ActionViewItemWithClassName extends ActionViewItem { container.classList.add(this._className); } } + + protected override updateTooltip(): void { + // NOOP, disable tooltip + } } class StatusBarViewItem extends MenuEntryActionViewItem { @@ -305,6 +309,10 @@ class StatusBarViewItem extends MenuEntryActionViewItem { this.label.classList.add('inlineSuggestionStatusBarItemLabel'); } } + + protected override updateTooltip(): void { + // NOOP, disable tooltip + } } export class CustomizedMenuWorkbenchToolBar extends WorkbenchToolBar { From 846f74c3ae97951caa84823002e446bd02577a87 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Fri, 8 Dec 2023 11:58:20 -0800 Subject: [PATCH 3/5] debug: use a warning in toolbar to be consistent with errors from keybindings (#200397) Fixes #172918 --- src/vs/workbench/contrib/debug/browser/debugToolBar.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts index 88e597e76be..ce66d512dc2 100644 --- a/src/vs/workbench/contrib/debug/browser/debugToolBar.ts +++ b/src/vs/workbench/contrib/debug/browser/debugToolBar.ts @@ -145,7 +145,7 @@ export class DebugToolBar extends Themable implements IWorkbenchContribution { this._register(this.actionBar.actionRunner.onDidRun((e: IRunEvent) => { // check for error if (e.error && !errors.isCancellationError(e.error)) { - this.notificationService.error(e.error); + this.notificationService.warn(e.error); } // log in telemetry From ceb8df5c023027096b61ec36fa686c39b035f79c Mon Sep 17 00:00:00 2001 From: Logan Ramos Date: Fri, 8 Dec 2023 12:59:09 -0700 Subject: [PATCH 4/5] Patch crashing explorer on paste (#200396) * Patch crashing explorer on paste * Write filename to clipboard --- src/vs/workbench/contrib/files/browser/explorerService.ts | 3 +++ src/vs/workbench/contrib/files/browser/fileActions.ts | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/vs/workbench/contrib/files/browser/explorerService.ts b/src/vs/workbench/contrib/files/browser/explorerService.ts index 8d184d071a0..ed417b5fee5 100644 --- a/src/vs/workbench/contrib/files/browser/explorerService.ts +++ b/src/vs/workbench/contrib/files/browser/explorerService.ts @@ -286,6 +286,9 @@ export class ExplorerService implements IExplorerService { const previouslyCutItems = this.cutItems; this.cutItems = cut ? items : undefined; await this.clipboardService.writeResources(items.map(s => s.resource)); + if (items.length === 1) { + await this.clipboardService.writeText(items[0].name); + } this.view?.itemsCopied(items, cut, previouslyCutItems); } diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index f75d163a596..da784179f5f 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -1124,6 +1124,12 @@ export const pasteFileHandler = async (accessor: ServicesAccessor, fileList?: Fi const element = context.length ? context[0] : explorerService.roots[0]; const incrementalNaming = configurationService.getValue().explorer.incrementalNaming; + const editableItem = explorerService.getEditable(); + // If it's an editable item, just do nothing + if (editableItem) { + return; + } + try { // Check if target is ancestor of pasted folder const sourceTargetPairs = coalesce(await Promise.all(toPaste.map(async fileToPaste => { From d3bedefd42b8641d5ebcebc974cce7fbd97687d3 Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Fri, 8 Dec 2023 12:16:12 -0800 Subject: [PATCH 5/5] process-explorer: fix not updating pid/name mapping correctly (#200401) The mapPidToName was getting reassigned rather than mutated which prevented the ProcessRenderer from seeing the correct names if they got updated. Fixes #172120 --- .../electron-sandbox/processExplorer/processExplorerMain.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts b/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts index 522c418ffaa..1d2089e1586 100644 --- a/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts +++ b/src/vs/code/electron-sandbox/processExplorer/processExplorerMain.ts @@ -245,7 +245,7 @@ class ProcessExplorer { this.setEventHandlers(data); ipcRenderer.on('vscode:pidToNameResponse', (event: unknown, pidToNames: [number, string][]) => { - this.mapPidToName = new Map(); + this.mapPidToName.clear(); for (const [pid, name] of pidToNames) { this.mapPidToName.set(pid, name);