-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
vscode.workspace.onDidChangeTextDocument
is called with no changes
#50344
Comments
(Experimental duplicate detection) |
vscode.workspace.onDidChangeTextDocument
is called with no changes
|
I believe there was an unfortunate idea to call this event when the file gets saved ... or something along those lines. IMHO we should remove that. |
That's the current design and when the dirty-state changes the event is being send. Not sure we can change this without breaking others |
@jrieken from what I can see the function passed to |
I am not here to judge code quality but my role is to not break existing extensions ;-) I think checking the
|
Closing because no code change is planned |
I've noticed the function passed to
vscode.workspace.onDidChangeTextDocument
gets called twice if I just insert a new line into the document, the first time it gets calledcontentChanges
is empty.An extension might perform a lot of work when the document changes, triggering this event without any actual change seems pretty wasteful.
The text was updated successfully, but these errors were encountered: