Skip to content

Commit 7e43901

Browse files
committed
Removes no longer needed decorator removal
1 parent bbc94fb commit 7e43901

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/currentLineController.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -245,17 +245,11 @@ export class CurrentLineController extends Disposable {
245245
this._statusBarItem && this._statusBarItem.hide();
246246
}
247247

248-
private async clearAnnotations(editor: TextEditor | undefined, force: boolean = false) {
248+
private clearAnnotations(editor: TextEditor | undefined, force: boolean = false) {
249249
if (editor === undefined || (!this._isAnnotating && !force)) return;
250250

251251
editor.setDecorations(annotationDecoration, []);
252252
this._isAnnotating = false;
253-
254-
if (!force) return;
255-
256-
// I have no idea why the decorators sometimes don't get removed, but if they don't try again with a tiny delay
257-
await Functions.wait(1);
258-
editor.setDecorations(annotationDecoration, []);
259253
}
260254

261255
async refresh(editor?: TextEditor) {
@@ -309,7 +303,7 @@ export class CurrentLineController extends Disposable {
309303
if (!state.enabled || state.annotationType !== type) {
310304
this._blameLineAnnotationState = { enabled: true, annotationType: type, reason: reason };
311305

312-
await this.clearAnnotations(editor);
306+
this.clearAnnotations(editor);
313307
await this.updateBlame(editor.selection.active.line, editor);
314308
}
315309
}
@@ -320,7 +314,7 @@ export class CurrentLineController extends Disposable {
320314
const state = this.getLineAnnotationState();
321315
this._blameLineAnnotationState = { enabled: !state.enabled, annotationType: type, reason: reason };
322316

323-
await this.clearAnnotations(editor);
317+
this.clearAnnotations(editor);
324318
await this.updateBlame(editor.selection.active.line, editor);
325319
}
326320

0 commit comments

Comments
 (0)