Skip to content

Commit 942f882

Browse files
Signature help fix tweak. (#1067)
Close the signature help while we know the view is still good. Alternatively we could cancel the timeout but this is OK too. I can't see simple API to check that a view is still good to interact with after an async step.
1 parent b06bed5 commit 942f882

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/editor/codemirror/language-server/signatureHelp.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,11 @@ export const signatureHelp = (
317317
!event.relatedTarget.closest(".cm-signature-tooltip")
318318
) {
319319
// This can be called inside an update.
320-
setTimeout(() => {
320+
queueMicrotask(() => {
321321
view.dispatch({
322322
effects: setSignatureHelpRequestPosition.of(-1),
323323
});
324-
}, 0);
324+
});
325325
}
326326
},
327327
}),

0 commit comments

Comments
 (0)