gornostal / Modific

Highlight lines changed since the last commit (supports Git, SVN, Bazaar, Mercurial and TFS) / ST2(3) plugin
614 stars 44 forks source link

Tab 'close' icon doesn't show unsaved status correctly #14

Closed spinningarrow closed 12 years ago

spinningarrow commented 12 years ago

Normally in ST2, if I edit a file and don't save it, the 'close' icon for that tab changes to a filled circle, like the image below: ST2-Unsaved-Changes If I undo all my unsaved changes, then ST2 changes the circle back to the 'close' icon.

Now when I'm using Modific, when I edit a file and don't save it, the 'close' icon changes to the circle as normal. When I switch over to another tab, and then back to the original one, Modific highlights the lines where I've made changes (I believe this is the normal behaviour) and since I haven't saved my file, ST2 still shows the circle in the tab.

Now here's the funny thing: if I switch over to another tab, and then back to the original one, the circle icon changes to the 'close' icon, even though I haven't saved my file. Moreover, when I undo all the unsaved changes, the 'close' icon changes to the circle even though there are no changes to be saved in the file.

I don't have autosave enabled in ST2, and I'm using Git as the VCS.

gornostal commented 12 years ago

Modific automatically save a document on activate and on every command. That's why you have these issues. If I disable automatic saving, plugin can't give expected results in some cases.

Probably I will add an extra option in config to disable autosaving.

spinningarrow commented 12 years ago

Ah, that explains it.

And yup, I'd love a config option to disable autosaving! Thanks!