Skip to content

Commit 74724fb

Browse files
authored
"Convert Indentation to {tabs,spaces}" only effects auxwindow (fix microsoft#205169) (microsoft#205577)
1 parent 9b0d743 commit 74724fb

File tree

4 files changed

+12
-18
lines changed

4 files changed

+12
-18
lines changed

src/vs/platform/hover/browser/hover.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ export class WorkbenchHoverDelegate extends Disposable implements IHoverDelegate
238238
private lastHoverHideTime = Number.MAX_VALUE;
239239
private timeLimit = 200;
240240

241-
242241
private _delay: number;
243242
get delay(): number {
244243
if (this.instantHover && Date.now() - this.lastHoverHideTime < this.timeLimit) {

src/vs/workbench/browser/parts/editor/breadcrumbsControl.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,7 @@ export class BreadcrumbsControl {
206206
@IEditorService private readonly _editorService: IEditorService,
207207
@ILabelService private readonly _labelService: ILabelService,
208208
@IConfigurationService configurationService: IConfigurationService,
209-
@IBreadcrumbsService breadcrumbsService: IBreadcrumbsService,
210-
@IInstantiationService instantiationService: IInstantiationService,
209+
@IBreadcrumbsService breadcrumbsService: IBreadcrumbsService
211210
) {
212211
this.domNode = document.createElement('div');
213212
this.domNode.classList.add('breadcrumbs-control');

src/vs/workbench/browser/parts/editor/editorStatus.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,9 @@ class EditorStatus extends Disposable {
366366
}
367367

368368
private registerCommands(): void {
369-
CommandsRegistry.registerCommand({ id: 'changeEditorIndentation', handler: () => this.showIndentationPicker() });
369+
CommandsRegistry.registerCommand({ id: `changeEditorIndentation${this.targetWindowId}`, handler: () => this.showIndentationPicker() });
370370
}
371371

372-
373372
private async showIndentationPicker(): Promise<unknown> {
374373
const activeTextEditorControl = getCodeEditor(this.editorService.activeTextEditorControl);
375374
if (!activeTextEditorControl) {
@@ -483,7 +482,7 @@ class EditorStatus extends Disposable {
483482
text,
484483
ariaLabel: text,
485484
tooltip: localize('selectIndentation', "Select Indentation"),
486-
command: 'changeEditorIndentation'
485+
command: `changeEditorIndentation${this.targetWindowId}`
487486
};
488487

489488
this.updateElement(this.indentationElement, props, 'status.editor.indentation', StatusbarAlignment.RIGHT, 100.4);

src/vs/workbench/browser/parts/statusbar/statusbarPart.ts

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,14 @@ class StatusbarPart extends Part implements IStatusbarEntryContainer {
136136
private leftItemsContainer: HTMLElement | undefined;
137137
private rightItemsContainer: HTMLElement | undefined;
138138

139-
140-
private readonly hoverDelegate: WorkbenchHoverDelegate;
139+
private readonly hoverDelegate = this._register(this.instantiationService.createInstance(WorkbenchHoverDelegate, 'element', true, (_, focus?: boolean) => (
140+
{
141+
persistence: {
142+
hideOnKeyDown: true,
143+
sticky: focus
144+
}
145+
}
146+
)));
141147

142148
private readonly compactEntriesDisposable = this._register(new MutableDisposable<DisposableStore>());
143149
private readonly styleOverrides = new Set<IStatusbarStyleOverride>();
@@ -149,20 +155,11 @@ class StatusbarPart extends Part implements IStatusbarEntryContainer {
149155
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
150156
@IStorageService private readonly storageService: IStorageService,
151157
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
152-
@IContextMenuService private contextMenuService: IContextMenuService,
158+
@IContextMenuService private readonly contextMenuService: IContextMenuService,
153159
@IContextKeyService private readonly contextKeyService: IContextKeyService,
154160
) {
155161
super(id, { hasTitle: false }, themeService, storageService, layoutService);
156162

157-
this.hoverDelegate = this._register(instantiationService.createInstance(WorkbenchHoverDelegate, 'element', true, (_, focus?: boolean) => (
158-
{
159-
persistence: {
160-
hideOnKeyDown: true,
161-
sticky: focus
162-
}
163-
}
164-
)));
165-
166163
this.registerListeners();
167164
}
168165

0 commit comments

Comments
 (0)