Skip to content

Commit

Permalink
Only handle changes to file: URL text documents (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinfagnani committed Mar 5, 2024
1 parent 1cc650c commit 5219437
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/labs/ignition/src/lib/ignition.ts
Expand Up @@ -262,9 +262,14 @@ export class Ignition {
context.subscriptions.push(disposable);

disposable = vscode.workspace.onDidChangeTextDocument((event) => {
const {document} = event;
if (document.uri.scheme !== 'file') {
// Scheme may be 'output' for log files, etc.
return;
}
const changed = this.#buffers.set(
event.document.uri.fsPath as AbsolutePath,
event.document.getText()
document.uri.fsPath as AbsolutePath,
document.getText()
);
if (changed) {
this.#fileChanged();
Expand Down

0 comments on commit 5219437

Please sign in to comment.