diff --git a/build/lib/stylelint/vscode-known-variables.json b/build/lib/stylelint/vscode-known-variables.json index 079db67620a..a6c8a027688 100644 --- a/build/lib/stylelint/vscode-known-variables.json +++ b/build/lib/stylelint/vscode-known-variables.json @@ -11,12 +11,12 @@ "--vscode-activityBar-inactiveForeground", "--vscode-activityBarBadge-background", "--vscode-activityBarBadge-foreground", + "--vscode-activityBarTop-activeBackground", "--vscode-activityBarTop-activeBorder", + "--vscode-activityBarTop-background", "--vscode-activityBarTop-dropBorder", "--vscode-activityBarTop-foreground", "--vscode-activityBarTop-inactiveForeground", - "--vscode-activityBarTop-background", - "--vscode-activityBarTop-activeBackground", "--vscode-badge-background", "--vscode-badge-foreground", "--vscode-banner-background", @@ -261,6 +261,10 @@ "--vscode-editorMarkerNavigationInfo-headerBackground", "--vscode-editorMarkerNavigationWarning-background", "--vscode-editorMarkerNavigationWarning-headerBackground", + "--vscode-editorMultiCursor-primary-background", + "--vscode-editorMultiCursor-primary-foreground", + "--vscode-editorMultiCursor-secondary-background", + "--vscode-editorMultiCursor-secondary-foreground", "--vscode-editorOverviewRuler-addedForeground", "--vscode-editorOverviewRuler-background", "--vscode-editorOverviewRuler-border", @@ -557,11 +561,11 @@ "--vscode-sideBar-border", "--vscode-sideBar-dropBackground", "--vscode-sideBar-foreground", + "--vscode-sideBarActivityBarTop-border", "--vscode-sideBarSectionHeader-background", "--vscode-sideBarSectionHeader-border", "--vscode-sideBarSectionHeader-foreground", "--vscode-sideBarTitle-foreground", - "--vscode-sideBarActivityBarTop-border", "--vscode-sideBySideEditor-horizontalBorder", "--vscode-sideBySideEditor-verticalBorder", "--vscode-simpleFindWidget-sashBorder", @@ -702,11 +706,17 @@ "--vscode-testing-coveredBorder", "--vscode-testing-coveredGutterBackground", "--vscode-testing-iconErrored", + "--vscode-testing-iconErrored-retired", "--vscode-testing-iconFailed", + "--vscode-testing-iconFailed-retired", "--vscode-testing-iconPassed", + "--vscode-testing-iconPassed-retired", "--vscode-testing-iconQueued", + "--vscode-testing-iconQueued-retired", "--vscode-testing-iconSkipped", + "--vscode-testing-iconSkipped-retired", "--vscode-testing-iconUnset", + "--vscode-testing-iconUnset-retired", "--vscode-testing-message-error-decorationForeground", "--vscode-testing-message-error-lineBackground", "--vscode-testing-message-info-decorationForeground", @@ -720,7 +730,6 @@ "--vscode-testing-uncoveredBorder", "--vscode-testing-uncoveredBranchBackground", "--vscode-testing-uncoveredGutterBackground", - "--vscode-testing-uncoveredGutterBackground", "--vscode-textBlockQuote-background", "--vscode-textBlockQuote-border", "--vscode-textCodeBlock-background", diff --git a/extensions/typescript-language-features/src/extension.browser.ts b/extensions/typescript-language-features/src/extension.browser.ts index 66532bc81fc..91a652ed6fa 100644 --- a/extensions/typescript-language-features/src/extension.browser.ts +++ b/extensions/typescript-language-features/src/extension.browser.ts @@ -118,7 +118,7 @@ async function startPreloadWorkspaceContentsIfNeeded(context: vscode.ExtensionCo return; } - const workspaceUri = vscode.workspace.workspaceFolders?.[0].uri; + const workspaceUri = vscode.workspace.workspaceFolders?.at(0)?.uri; if (!workspaceUri || workspaceUri.scheme !== 'vscode-vfs' || !workspaceUri.authority.startsWith('github')) { logger.info(`Skipped loading workspace contents for repository ${workspaceUri?.toString()}`); return; diff --git a/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.ts b/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.ts index 357a481eb87..e584c56b0b5 100644 --- a/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.ts +++ b/src/vs/editor/contrib/dropOrPasteInto/browser/postEditWidget.ts @@ -164,6 +164,9 @@ export class PostEditWidgetManager 1) { this.show(editRange ?? primaryRange, edits, async (newEditIndex) => { const model = this._editor.getModel(); diff --git a/src/vs/editor/contrib/snippet/browser/snippetController2.ts b/src/vs/editor/contrib/snippet/browser/snippetController2.ts index 0290c450113..e066ef8ee56 100644 --- a/src/vs/editor/contrib/snippet/browser/snippetController2.ts +++ b/src/vs/editor/contrib/snippet/browser/snippetController2.ts @@ -331,7 +331,7 @@ registerEditorCommand(new CommandCtor({ handler: ctrl => ctrl.next(), kbOpts: { weight: KeybindingWeight.EditorContrib + 30, - kbExpr: EditorContextKeys.editorTextFocus, + kbExpr: EditorContextKeys.textInputFocus, primary: KeyCode.Tab } })); @@ -341,7 +341,7 @@ registerEditorCommand(new CommandCtor({ handler: ctrl => ctrl.prev(), kbOpts: { weight: KeybindingWeight.EditorContrib + 30, - kbExpr: EditorContextKeys.editorTextFocus, + kbExpr: EditorContextKeys.textInputFocus, primary: KeyMod.Shift | KeyCode.Tab } })); @@ -351,7 +351,7 @@ registerEditorCommand(new CommandCtor({ handler: ctrl => ctrl.cancel(true), kbOpts: { weight: KeybindingWeight.EditorContrib + 30, - kbExpr: EditorContextKeys.editorTextFocus, + kbExpr: EditorContextKeys.textInputFocus, primary: KeyCode.Escape, secondary: [KeyMod.Shift | KeyCode.Escape] } diff --git a/src/vs/platform/telemetry/common/telemetryUtils.ts b/src/vs/platform/telemetry/common/telemetryUtils.ts index 5deb494c3b4..c26c33886cc 100644 --- a/src/vs/platform/telemetry/common/telemetryUtils.ts +++ b/src/vs/platform/telemetry/common/telemetryUtils.ts @@ -333,6 +333,7 @@ function removePropertiesWithPossibleUserInfo(property: string): string { { label: 'Slack Token', regex: /xox[pbar]\-[A-Za-z0-9]/ }, { label: 'GitHub Token', regex: /(gh[psuro]_[a-zA-Z0-9]{36}|github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59})/ }, { label: 'Generic Secret', regex: /(key|token|sig|secret|signature|password|passwd|pwd|android:value)[^a-zA-Z0-9]/i }, + { label: 'CLI Credentials', regex: /((login|psexec|(certutil|psexec)\.exe).{1,50}(\s-u(ser(name)?)?\s+.{3,100})?\s-(admin|user|vm|root)?p(ass(word)?)?\s+["']?[^$\-\/\s]|(^|[\s\r\n\\])net(\.exe)?.{1,5}(user\s+|share\s+\/user:| user -? secrets ? set) \s + [^ $\s \/])/ }, { label: 'Email', regex: /@[a-zA-Z0-9-]+\.[a-zA-Z0-9-]+/ } // Regex which matches @*.site ]; diff --git a/src/vs/workbench/api/browser/mainThreadBulkEdits.ts b/src/vs/workbench/api/browser/mainThreadBulkEdits.ts index 6a42b3b1050..a34257bb792 100644 --- a/src/vs/workbench/api/browser/mainThreadBulkEdits.ts +++ b/src/vs/workbench/api/browser/mainThreadBulkEdits.ts @@ -12,6 +12,7 @@ import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity' import { IWorkspaceEditDto, IWorkspaceFileEditDto, MainContext, MainThreadBulkEditsShape } from 'vs/workbench/api/common/extHost.protocol'; import { ResourceNotebookCellEdit } from 'vs/workbench/contrib/bulkEdit/browser/bulkCellEdits'; import { IExtHostContext, extHostNamedCustomer } from 'vs/workbench/services/extensions/common/extHostCustomers'; +import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; @extHostNamedCustomer(MainContext.MainThreadBulkEdits) @@ -26,8 +27,8 @@ export class MainThreadBulkEdits implements MainThreadBulkEditsShape { dispose(): void { } - $tryApplyWorkspaceEdit(dto: IWorkspaceEditDto, undoRedoGroupId?: number, isRefactoring?: boolean): Promise { - const edits = reviveWorkspaceEditDto(dto, this._uriIdentService); + $tryApplyWorkspaceEdit(dto: SerializableObjectWithBuffers, undoRedoGroupId?: number, isRefactoring?: boolean): Promise { + const edits = reviveWorkspaceEditDto(dto.value, this._uriIdentService); return this._bulkEditService.apply(edits, { undoRedoGroupId, respectAutoSaveConfig: isRefactoring }).then((res) => res.isApplied, err => { this._logService.warn(`IGNORING workspace edit: ${err}`); return false; diff --git a/src/vs/workbench/api/common/extHost.protocol.ts b/src/vs/workbench/api/common/extHost.protocol.ts index 33133f8fedb..ff01d3fb49c 100644 --- a/src/vs/workbench/api/common/extHost.protocol.ts +++ b/src/vs/workbench/api/common/extHost.protocol.ts @@ -262,7 +262,7 @@ export interface ITextDocumentShowOptions { } export interface MainThreadBulkEditsShape extends IDisposable { - $tryApplyWorkspaceEdit(workspaceEditDto: IWorkspaceEditDto, undoRedoGroupId?: number, respectAutoSaveConfig?: boolean): Promise; + $tryApplyWorkspaceEdit(workspaceEditDto: SerializableObjectWithBuffers, undoRedoGroupId?: number, respectAutoSaveConfig?: boolean): Promise; } export interface MainThreadTextEditorsShape extends IDisposable { diff --git a/src/vs/workbench/api/common/extHostBulkEdits.ts b/src/vs/workbench/api/common/extHostBulkEdits.ts index bdbfe2e5ba8..281a003c40c 100644 --- a/src/vs/workbench/api/common/extHostBulkEdits.ts +++ b/src/vs/workbench/api/common/extHostBulkEdits.ts @@ -8,6 +8,7 @@ import { MainContext, MainThreadBulkEditsShape } from 'vs/workbench/api/common/e import { ExtHostDocumentsAndEditors } from 'vs/workbench/api/common/extHostDocumentsAndEditors'; import { IExtHostRpcService } from 'vs/workbench/api/common/extHostRpcService'; import { WorkspaceEdit } from 'vs/workbench/api/common/extHostTypeConverters'; +import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import type * as vscode from 'vscode'; export class ExtHostBulkEdits { @@ -28,7 +29,7 @@ export class ExtHostBulkEdits { } applyWorkspaceEdit(edit: vscode.WorkspaceEdit, extension: IExtensionDescription, metadata: vscode.WorkspaceEditMetadata | undefined): Promise { - const dto = WorkspaceEdit.from(edit, this._versionInformationProvider); + const dto = new SerializableObjectWithBuffers(WorkspaceEdit.from(edit, this._versionInformationProvider)); return this._proxy.$tryApplyWorkspaceEdit(dto, undefined, metadata?.isRefactoring ?? false); } } diff --git a/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts b/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts index 7a90e5db0f9..de3123da9de 100644 --- a/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/common/extHostDocumentSaveParticipant.ts @@ -15,6 +15,7 @@ import type * as vscode from 'vscode'; import { LinkedList } from 'vs/base/common/linkedList'; import { ILogService } from 'vs/platform/log/common/log'; import { IExtensionDescription } from 'vs/platform/extensions/common/extensions'; +import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; type Listener = [Function, any, IExtensionDescription]; @@ -165,7 +166,7 @@ export class ExtHostDocumentSaveParticipant implements ExtHostDocumentSavePartic } if (version === document.version) { - return this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(dto); + return this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(new SerializableObjectWithBuffers(dto)); } return Promise.reject(new Error('concurrent_edits')); diff --git a/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.ts b/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.ts index 1e6a706a305..0f031e2f76b 100644 --- a/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.ts +++ b/src/vs/workbench/api/common/extHostNotebookDocumentSaveParticipant.ts @@ -13,6 +13,7 @@ import { ExtHostNotebookController } from 'vs/workbench/api/common/extHostNotebo import { TextDocumentSaveReason, WorkspaceEdit as WorksapceEditConverter } from 'vs/workbench/api/common/extHostTypeConverters'; import { WorkspaceEdit } from 'vs/workbench/api/common/extHostTypes'; import { SaveReason } from 'vs/workbench/common/editor'; +import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import { NotebookDocumentWillSaveEvent } from 'vscode'; interface IExtensionListener { @@ -90,6 +91,6 @@ export class ExtHostNotebookDocumentSaveParticipant implements ExtHostNotebookDo dto.edits = dto.edits.concat(edits); } - return this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(dto); + return this._mainThreadBulkEdits.$tryApplyWorkspaceEdit(new SerializableObjectWithBuffers(dto)); } } diff --git a/src/vs/workbench/api/test/browser/extHostBulkEdits.test.ts b/src/vs/workbench/api/test/browser/extHostBulkEdits.test.ts index f17a6c5b0e9..045f3d77cc1 100644 --- a/src/vs/workbench/api/test/browser/extHostBulkEdits.test.ts +++ b/src/vs/workbench/api/test/browser/extHostBulkEdits.test.ts @@ -13,6 +13,7 @@ import { NullLogService } from 'vs/platform/log/common/log'; import { ExtHostBulkEdits } from 'vs/workbench/api/common/extHostBulkEdits'; import { nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'; import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils'; +import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; suite('ExtHostBulkEdits.applyWorkspaceEdit', () => { @@ -25,8 +26,8 @@ suite('ExtHostBulkEdits.applyWorkspaceEdit', () => { const rpcProtocol = new TestRPCProtocol(); rpcProtocol.set(MainContext.MainThreadBulkEdits, new class extends mock() { - override $tryApplyWorkspaceEdit(_workspaceResourceEdits: IWorkspaceEditDto): Promise { - workspaceResourceEdits = _workspaceResourceEdits; + override $tryApplyWorkspaceEdit(_workspaceResourceEdits: SerializableObjectWithBuffers): Promise { + workspaceResourceEdits = _workspaceResourceEdits.value; return Promise.resolve(true); } }); diff --git a/src/vs/workbench/api/test/browser/extHostDocumentSaveParticipant.test.ts b/src/vs/workbench/api/test/browser/extHostDocumentSaveParticipant.test.ts index 59c02e4d3b1..632487d43c0 100644 --- a/src/vs/workbench/api/test/browser/extHostDocumentSaveParticipant.test.ts +++ b/src/vs/workbench/api/test/browser/extHostDocumentSaveParticipant.test.ts @@ -16,6 +16,7 @@ import { mock } from 'vs/base/test/common/mock'; import { NullLogService } from 'vs/platform/log/common/log'; import { nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'; import { ensureNoDisposablesAreLeakedInTestSuite } from 'vs/base/test/common/utils'; +import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; function timeout(n: number) { return new Promise(resolve => setTimeout(resolve, n)); @@ -257,8 +258,8 @@ suite('ExtHostDocumentSaveParticipant', () => { let dto: IWorkspaceEditDto; const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, new class extends mock() { - $tryApplyWorkspaceEdit(_edits: IWorkspaceEditDto) { - dto = _edits; + $tryApplyWorkspaceEdit(_edits: SerializableObjectWithBuffers) { + dto = _edits.value; return Promise.resolve(true); } }); @@ -281,8 +282,8 @@ suite('ExtHostDocumentSaveParticipant', () => { let edits: IWorkspaceEditDto; const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, new class extends mock() { - $tryApplyWorkspaceEdit(_edits: IWorkspaceEditDto) { - edits = _edits; + $tryApplyWorkspaceEdit(_edits: SerializableObjectWithBuffers) { + edits = _edits.value; return Promise.resolve(true); } }); @@ -318,9 +319,9 @@ suite('ExtHostDocumentSaveParticipant', () => { test('event delivery, two listeners -> two document states', () => { const participant = new ExtHostDocumentSaveParticipant(nullLogService, documents, new class extends mock() { - $tryApplyWorkspaceEdit(dto: IWorkspaceEditDto) { + $tryApplyWorkspaceEdit(dto: SerializableObjectWithBuffers) { - for (const edit of dto.edits) { + for (const edit of dto.value.edits) { const uri = URI.revive((edit).resource); const { text, range } = (edit).textEdit; diff --git a/src/vs/workbench/api/test/browser/mainThreadEditors.test.ts b/src/vs/workbench/api/test/browser/mainThreadEditors.test.ts index 78d484a667d..9809814a6c0 100644 --- a/src/vs/workbench/api/test/browser/mainThreadEditors.test.ts +++ b/src/vs/workbench/api/test/browser/mainThreadEditors.test.ts @@ -48,6 +48,7 @@ import { BulkEditService } from 'vs/workbench/contrib/bulkEdit/browser/bulkEditS import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { IEditorService } from 'vs/workbench/services/editor/common/editorService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { SerializableObjectWithBuffers } from 'vs/workbench/services/extensions/common/proxyIdentifier'; import { LabelService } from 'vs/workbench/services/label/common/labelService'; import { ILifecycleService } from 'vs/workbench/services/lifecycle/common/lifecycle'; import { IPaneCompositePartService } from 'vs/workbench/services/panecomposite/browser/panecomposite'; @@ -204,7 +205,7 @@ suite('MainThreadEditors', () => { // Act as if the user edited the model model.applyEdits([EditOperation.insert(new Position(0, 0), 'something')]); - return bulkEdits.$tryApplyWorkspaceEdit({ edits: [workspaceResourceEdit] }).then((result) => { + return bulkEdits.$tryApplyWorkspaceEdit(new SerializableObjectWithBuffers({ edits: [workspaceResourceEdit] })).then((result) => { assert.strictEqual(result, false); }); }); @@ -230,11 +231,11 @@ suite('MainThreadEditors', () => { } }; - const p1 = bulkEdits.$tryApplyWorkspaceEdit({ edits: [workspaceResourceEdit1] }).then((result) => { + const p1 = bulkEdits.$tryApplyWorkspaceEdit(new SerializableObjectWithBuffers({ edits: [workspaceResourceEdit1] })).then((result) => { // first edit request succeeds assert.strictEqual(result, true); }); - const p2 = bulkEdits.$tryApplyWorkspaceEdit({ edits: [workspaceResourceEdit2] }).then((result) => { + const p2 = bulkEdits.$tryApplyWorkspaceEdit(new SerializableObjectWithBuffers({ edits: [workspaceResourceEdit2] })).then((result) => { // second edit request fails assert.strictEqual(result, false); }); @@ -242,13 +243,13 @@ suite('MainThreadEditors', () => { }); test(`applyWorkspaceEdit with only resource edit`, () => { - return bulkEdits.$tryApplyWorkspaceEdit({ + return bulkEdits.$tryApplyWorkspaceEdit(new SerializableObjectWithBuffers({ edits: [ { oldResource: resource, newResource: resource, options: undefined }, { oldResource: undefined, newResource: resource, options: undefined }, { oldResource: resource, newResource: undefined, options: undefined } ] - }).then((result) => { + })).then((result) => { assert.strictEqual(result, true); assert.strictEqual(movedResources.get(resource), resource); assert.strictEqual(createdResources.has(resource), true); diff --git a/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css b/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css index 18e66d6a1df..5193ebcd591 100644 --- a/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css +++ b/src/vs/workbench/browser/parts/editor/media/multieditortabscontrol.css @@ -106,6 +106,38 @@ padding-left: 10px; } +/* Tab Background Color in/active group/tab */ +.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab { + background-color: var(--vscode-tab-unfocusedInactiveBackground); +} +.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab { + background-color: var(--vscode-tab-inactiveBackground); +} +.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active { + background-color: var(--vscode-tab-unfocusedActiveBackground); +} +.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active { + background-color: var(--vscode-tab-activeBackground); +} + +/* Tab Foreground Color in/active group/tab */ +.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab { + color: var(--vscode-tab-unfocusedInactiveForeground); +} +.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab { + color: var(--vscode-tab-inactiveForeground); +} +.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab.active { + color: var(--vscode-tab-unfocusedActiveForeground); +} +.monaco-workbench .part.editor > .content .editor-group-container.active > .title .tabs-container > .tab.active { + color: var(--vscode-tab-activeForeground); +} + +.monaco-workbench .part.editor > .content .editor-group-container > .title .tabs-container > .tab:not(.active) { + box-shadow: none; +} + .monaco-workbench .part.editor > .content .editor-group-container > .title > .tabs-and-actions-container.wrapping .tabs-container > .tab:last-child { margin-right: var(--last-tab-margin-right); /* when tabs wrap, we need a margin away from the absolute positioned editor actions */ } diff --git a/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts b/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts index 0043df4e615..9033dec8212 100644 --- a/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts +++ b/src/vs/workbench/browser/parts/editor/multiEditorTabsControl.ts @@ -26,7 +26,7 @@ import { ScrollableElement } from 'vs/base/browser/ui/scrollbar/scrollableElemen import { ScrollbarVisibility } from 'vs/base/common/scrollable'; import { getOrSet } from 'vs/base/common/map'; import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService'; -import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_ACTIVE_FOREGROUND, TAB_INACTIVE_FOREGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_FOREGROUND, TAB_UNFOCUSED_INACTIVE_FOREGROUND, TAB_UNFOCUSED_ACTIVE_BACKGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER, TAB_HOVER_BACKGROUND, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BORDER, EDITOR_GROUP_HEADER_TABS_BACKGROUND, WORKBENCH_BACKGROUND, TAB_ACTIVE_BORDER_TOP, TAB_UNFOCUSED_ACTIVE_BORDER_TOP, TAB_ACTIVE_MODIFIED_BORDER, TAB_INACTIVE_MODIFIED_BORDER, TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER, TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER, TAB_UNFOCUSED_INACTIVE_BACKGROUND, TAB_HOVER_FOREGROUND, TAB_UNFOCUSED_HOVER_FOREGROUND, EDITOR_GROUP_HEADER_TABS_BORDER, TAB_LAST_PINNED_BORDER } from 'vs/workbench/common/theme'; +import { TAB_INACTIVE_BACKGROUND, TAB_ACTIVE_BACKGROUND, TAB_BORDER, EDITOR_DRAG_AND_DROP_BACKGROUND, TAB_UNFOCUSED_ACTIVE_BACKGROUND, TAB_UNFOCUSED_ACTIVE_BORDER, TAB_ACTIVE_BORDER, TAB_HOVER_BACKGROUND, TAB_HOVER_BORDER, TAB_UNFOCUSED_HOVER_BACKGROUND, TAB_UNFOCUSED_HOVER_BORDER, EDITOR_GROUP_HEADER_TABS_BACKGROUND, WORKBENCH_BACKGROUND, TAB_ACTIVE_BORDER_TOP, TAB_UNFOCUSED_ACTIVE_BORDER_TOP, TAB_ACTIVE_MODIFIED_BORDER, TAB_INACTIVE_MODIFIED_BORDER, TAB_UNFOCUSED_ACTIVE_MODIFIED_BORDER, TAB_UNFOCUSED_INACTIVE_MODIFIED_BORDER, TAB_UNFOCUSED_INACTIVE_BACKGROUND, TAB_HOVER_FOREGROUND, TAB_UNFOCUSED_HOVER_FOREGROUND, EDITOR_GROUP_HEADER_TABS_BORDER, TAB_LAST_PINNED_BORDER } from 'vs/workbench/common/theme'; import { activeContrastBorder, contrastBorder, editorBackground } from 'vs/platform/theme/common/colorRegistry'; import { ResourcesDropHandler, DraggedEditorIdentifier, DraggedEditorGroupIdentifier, extractTreeDropData, isWindowDraggedOver } from 'vs/workbench/browser/dnd'; import { Color } from 'vs/base/common/color'; @@ -1504,55 +1504,23 @@ export class MultiEditorTabsControl extends EditorTabsControl { private doRedrawTabActive(isGroupActive: boolean, allowBorderTop: boolean, editor: EditorInput, tabContainer: HTMLElement, tabActionBar: ActionBar): void { - // Tab is active - if (this.tabsModel.isActive(editor)) { + const isActive = this.tabsModel.isActive(editor); - // Container - tabContainer.classList.add('active'); - tabContainer.setAttribute('aria-selected', 'true'); - tabContainer.tabIndex = 0; // Only active tab can be focused into - tabContainer.style.backgroundColor = this.getColor(isGroupActive ? TAB_ACTIVE_BACKGROUND : TAB_UNFOCUSED_ACTIVE_BACKGROUND) || ''; + tabContainer.classList.toggle('active', isActive); + tabContainer.setAttribute('aria-selected', isActive ? 'true' : 'false'); + tabContainer.tabIndex = isActive ? 0 : -1; // Only active tab can be focused into + tabActionBar.setFocusable(isActive); + if (isActive) { + // Set border BOTTOM if theme defined color const activeTabBorderColorBottom = this.getColor(isGroupActive ? TAB_ACTIVE_BORDER : TAB_UNFOCUSED_ACTIVE_BORDER); - if (activeTabBorderColorBottom) { - tabContainer.classList.add('tab-border-bottom'); - tabContainer.style.setProperty('--tab-border-bottom-color', activeTabBorderColorBottom.toString()); - } else { - tabContainer.classList.remove('tab-border-bottom'); - tabContainer.style.removeProperty('--tab-border-bottom-color'); - } + tabContainer.classList.toggle('tab-border-bottom', !!activeTabBorderColorBottom); + tabContainer.style.setProperty('--tab-border-bottom-color', activeTabBorderColorBottom?.toString() ?? ''); + // Set border TOP if theme defined color const activeTabBorderColorTop = allowBorderTop ? this.getColor(isGroupActive ? TAB_ACTIVE_BORDER_TOP : TAB_UNFOCUSED_ACTIVE_BORDER_TOP) : undefined; - if (activeTabBorderColorTop) { - tabContainer.classList.add('tab-border-top'); - tabContainer.style.setProperty('--tab-border-top-color', activeTabBorderColorTop.toString()); - } else { - tabContainer.classList.remove('tab-border-top'); - tabContainer.style.removeProperty('--tab-border-top-color'); - } - - // Label - tabContainer.style.color = this.getColor(isGroupActive ? TAB_ACTIVE_FOREGROUND : TAB_UNFOCUSED_ACTIVE_FOREGROUND) || ''; - - // Actions - tabActionBar.setFocusable(true); - } - - // Tab is inactive - else { - - // Container - tabContainer.classList.remove('active'); - tabContainer.setAttribute('aria-selected', 'false'); - tabContainer.tabIndex = -1; // Only active tab can be focused into - tabContainer.style.backgroundColor = this.getColor(isGroupActive ? TAB_INACTIVE_BACKGROUND : TAB_UNFOCUSED_INACTIVE_BACKGROUND) || ''; - tabContainer.style.boxShadow = ''; - - // Label - tabContainer.style.color = this.getColor(isGroupActive ? TAB_INACTIVE_FOREGROUND : TAB_UNFOCUSED_INACTIVE_FOREGROUND) || ''; - - // Actions - tabActionBar.setFocusable(false); + tabContainer.classList.toggle('tab-border-top', !!activeTabBorderColorTop); + tabContainer.style.setProperty('--tab-border-top-color', activeTabBorderColorTop?.toString() ?? ''); } } diff --git a/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.ts b/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.ts index 8dd727d49c6..b7254439539 100644 --- a/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.ts +++ b/src/vs/workbench/contrib/interactive/browser/interactiveEditorInput.ts @@ -209,7 +209,11 @@ export class InteractiveEditorInput extends EditorInput implements ICompositeNot return undefined; // save cancelled } - return await this._editorModelReference.saveAs(target); + const saved = await this._editorModelReference.saveAs(target); + if (saved && 'resource' in saved && saved.resource) { + this._notebookService.getNotebookTextModel(saved.resource)?.dispose(); + } + return saved; } override matches(otherInput: EditorInput | IUntypedEditorInput): boolean { diff --git a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts index 48df279f0d8..f36a4d80bb1 100644 --- a/src/vs/workbench/contrib/scm/browser/scmViewPane.ts +++ b/src/vs/workbench/contrib/scm/browser/scmViewPane.ts @@ -82,6 +82,7 @@ import { Button, ButtonWithDescription, ButtonWithDropdown } from 'vs/base/brows import { INotificationService } from 'vs/platform/notification/common/notification'; import { RepositoryContextKeys } from 'vs/workbench/contrib/scm/browser/scmViewService'; import { DragAndDropController } from 'vs/editor/contrib/dnd/browser/dnd'; +import { CopyPasteController } from 'vs/editor/contrib/dropOrPasteInto/browser/copyPasteController'; import { DropIntoEditorController } from 'vs/editor/contrib/dropOrPasteInto/browser/dropIntoEditorController'; import { MessageController } from 'vs/editor/contrib/message/browser/messageController'; import { defaultButtonStyles, defaultCountBadgeStyles } from 'vs/platform/theme/browser/defaultStyles'; @@ -2494,6 +2495,7 @@ class SCMInputWidget { ColorDetector.ID, ContextMenuController.ID, DragAndDropController.ID, + CopyPasteController.ID, DropIntoEditorController.ID, LinkDetector.ID, MenuPreventer.ID, @@ -2505,7 +2507,7 @@ class SCMInputWidget { InlineCompletionsController.ID, CodeActionController.ID, FormatOnType.ID, - EditorDictation.ID + EditorDictation.ID, ]) }; @@ -2532,6 +2534,11 @@ class SCMInputWidget { }, 0); })); + this.disposables.add(this.inputEditor.onDidBlurEditorWidget(() => { + CopyPasteController.get(this.inputEditor)?.clearWidgets(); + DropIntoEditorController.get(this.inputEditor)?.clearWidgets(); + })); + const firstLineKey = this.contextKeyService.createKey('scmInputIsInFirstPosition', false); const lastLineKey = this.contextKeyService.createKey('scmInputIsInLastPosition', false); diff --git a/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions.ts b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions.ts index 9998539f95d..f17970dd14b 100644 --- a/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions.ts +++ b/src/vs/workbench/contrib/terminalContrib/quickFix/browser/terminalQuickFixBuiltinActions.ts @@ -238,7 +238,7 @@ export function gitCreatePr(): ITerminalQuickFixInternalOptions { }, commandExitResult: 'success', getQuickFixes: (matchResult: ITerminalCommandMatchResult) => { - const link = matchResult?.outputMatch?.regexMatch?.groups?.link; + const link = matchResult?.outputMatch?.regexMatch?.groups?.link?.trimEnd(); if (!link) { return; } diff --git a/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts b/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts index a103e946cf9..66c10d2415d 100644 --- a/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts +++ b/src/vs/workbench/services/userDataProfile/browser/userDataProfileImportExportService.ts @@ -556,6 +556,7 @@ export class UserDataProfileImportExportService extends Disposable implements IU try { await this.doExportProfile(userDataProfilesExportState); } catch (error) { + exportAction.enabled = true; this.notificationService.error(error); throw error; }