Skip to content

Commit 8121efd

Browse files
committed
Move Event.defer into EditorStatus
1 parent db64a8f commit 8121efd

File tree

3 files changed

+1
-8
lines changed

3 files changed

+1
-8
lines changed

src/vs/editor/browser/editorBrowser.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -518,12 +518,6 @@ export interface ICodeEditor extends editorCommon.IEditor {
518518
* @event
519519
*/
520520
readonly onDidChangeCursorPosition: Event<ICursorPositionChangedEvent>;
521-
/**
522-
* An event emitted when the cursor position has changed.
523-
* @event
524-
* @internal
525-
*/
526-
readonly onDidChangeCursorPositionDeferred: Event<void>;
527521
/**
528522
* An event emitted when the cursor selection has changed.
529523
* @event

src/vs/editor/browser/widget/codeEditorWidget.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ export class CodeEditorWidget extends Disposable implements editorBrowser.ICodeE
148148

149149
private readonly _onDidChangeCursorPosition: Emitter<ICursorPositionChangedEvent> = this._register(new Emitter<ICursorPositionChangedEvent>({ deliveryQueue: this._deliveryQueue }));
150150
public readonly onDidChangeCursorPosition: Event<ICursorPositionChangedEvent> = this._onDidChangeCursorPosition.event;
151-
public readonly onDidChangeCursorPositionDeferred: Event<void> = Event.defer(this._onDidChangeCursorPosition.event, this._store);
152151

153152
private readonly _onDidChangeCursorSelection: Emitter<ICursorSelectionChangedEvent> = this._register(new Emitter<ICursorSelectionChangedEvent>({ deliveryQueue: this._deliveryQueue }));
154153
public readonly onDidChangeCursorSelection: Event<ICursorSelectionChangedEvent> = this._onDidChangeCursorSelection.event;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ export class EditorStatus extends Disposable implements IWorkbenchContribution {
671671
}));
672672

673673
// Hook Listener for Selection changes
674-
this.activeEditorListeners.add(activeCodeEditor.onDidChangeCursorPositionDeferred(() => {
674+
this.activeEditorListeners.add(Event.defer(activeCodeEditor.onDidChangeCursorPosition, this._store)(() => {
675675
this.onSelectionChange(activeCodeEditor);
676676
this.currentProblemStatus.update(activeCodeEditor);
677677
}));

0 commit comments

Comments
 (0)