Skip to content

Commit

Permalink
Signature help fix tweak. (#1067)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
microbit-matt-hillsdon authored Nov 5, 2022
1 parent b06bed5 commit 942f882
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/editor/codemirror/language-server/signatureHelp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ export const signatureHelp = (
!event.relatedTarget.closest(".cm-signature-tooltip")
) {
// This can be called inside an update.
setTimeout(() => {
queueMicrotask(() => {
view.dispatch({
effects: setSignatureHelpRequestPosition.of(-1),
});
}, 0);
});
}
},
}),
Expand Down

0 comments on commit 942f882

Please sign in to comment.