Closed cybre closed 9 years ago
Yes, this is something I have thought about. Right now it mimics Sublime Text in that it acts as though it has been changed even if you revert the changes. But I think I can set it up to behave properly and lose the indicator if reverted back. Thanks for all the testing by the way!
To do this would involve saving a copy of the current data, or at least the steps needed to reproduce it. Tbh, pretty much every text editor I've used does this so I don't think it's a huge problem.
Yeah, it looks like there is some kind of way to handle this in the Vala libraries. But I'm not sure how this would affect performance to run it every time an edit is made.
I've seen some where it will notice if you undo everything with ctrl+z. What about some calculation/sum of the text (hash/checksum or something) and just store the original sum and calculate the current one to compare?
On Feb 17, 2015, at 3:38 PM, Ryan Sipes notifications@github.com wrote:
Yeah, it looks like there is some kind of way to handle this in the Vala libraries. But I'm not sure how this would affect performance to run it every time an edit is made.
— Reply to this email directly or view it on GitHub.
Marking this closed unless someone is planning to do a pull request to fix this.
Probably not needed. Maybe it should only perform this operation on files under a certain character length? On 20 Feb 2015 19:58, "Ryan Sipes" notifications@github.com wrote:
Marking this closed unless someone is planning to do a pull request to fix this.
— Reply to this email directly or view it on GitHub https://github.com/evolve-os/journal/issues/22#issuecomment-75308518.
The indicator should not be visible and the save button should revert to the normal style when I revert any changes made to the document (both saved and unsaved).