Saving a file that has no changes will create an unnecessary gist revision
Describe the bug The title is self-explanatory.
To Reproduce Steps to reproduce the behavior:
- Open a gist file.
- Press “Ctrl + S”.
- Go to the gist revisions and check that there is a “No changes” revision.
Expected behavior If I save a file in which I have not made any changes, no revision will be created in the gist.
Desktop
- VS Code Version: 1.99.3
- GistPad Version: 0.8.2
Additional context Some people have a habit of pressing “Ctrl + S” all the time, which will probably result in a lot of “No changes” revisions in their gists.
Yeah I'm one of those people that impulsively hit CTRL+S all the time, and I agree this needs to be fixed 😅
VS Code used to track when a file hasn't been changed since it was opened/saved, so that behavior appears to have changed. In https://gistpad.dev I track the original file state, and disable saving when there aren't actually changes. So I just need to introduce the same logic in the VS Code extension.
That said, I should be able to get to this in the next couple days. And apologies for the inconvenience.
This has turned out to be trickier than I hoped, since I think VS Code is actually allowing saves to go through that don't have changes. I'll keep looking, but I wanted to let you know I'm still investigating this.