Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Unsaved changes are overwritten when formatting #3

Open
davepeck opened this issue Dec 26, 2022 · 2 comments
Open

Unsaved changes are overwritten when formatting #3

davepeck opened this issue Dec 26, 2022 · 2 comments

Comments

@davepeck
Copy link

davepeck commented Dec 26, 2022

Thanks for making this! I'm working with Django templates and thought I'd give it a try.

It works great if I save my changes and then manually choose to format. However, if I forget to save my changes, or if I have editor.formatOnSave set to true for django-html, it overwrites my (unsaved) changes when formatting.

Looks like we're running djhtml over the saved file, rather than the vscode.TextDocument's current contents, here:

document.uri.fsPath,

Is this something you'd take a PR for?

@tomusher
Copy link
Owner

tomusher commented Jan 9, 2023

Good catch thank you! I'd absolutely take a PR for this.

@randomsnowflake
Copy link

Please have a look at this issue. I just stumbled over this issue. The extension is unusable in its current state.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants