We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5a2dc9f commit 9d60e10Copy full SHA for 9d60e10
src/utils/documentIndex.ts
@@ -87,7 +87,10 @@ function generateCompileFn(): (doc: CurrentTextFile | CurrentBinaryFile) => void
87
clearTimeout(timeout);
88
89
// Compile right away if this document is in the active text editor
90
- if (vscode.window.activeTextEditor?.document.uri.toString() == doc.uri.toString()) {
+ // and there are no other documents in the queue. This is needed
91
+ // to avoid noticeable latency when a user is editing a client-side
92
+ // file, saves it, and the auto-compile kicks in.
93
+ if (docs.length == 1 && vscode.window.activeTextEditor?.document.uri.toString() == doc.uri.toString()) {
94
compile([...docs]);
95
docs.length = 0;
96
return;
0 commit comments