[Cuis-dev] Displaying TextEditor as not dirty when saved contents are equal to current edits

Santiago Cubino sscubino at gmail.com
Sat Nov 12 15:58:07 PST 2022


Hello,

My name is Santiago Cubino, I'm a student at UBA. I was recently introduced
to Smalltalk and Cuis.

I think it would be nice if Cuis detected that a TextEditor is free of
changes when you are editing code, and for some reason regret the changes
by undoing or editing it back to what it was before.

Some IDEs already implement this by checking the undo-redo three, so that
if you are standing in the same point that the one the file was saved, the
file is marked free of edits.

Maybe, in Cuis, it would be better to even detect this by checking directly
if the acceptedChanges differ from the currentChanges. So that if you add
code and then remove it, the editor shows as pristine.

Below is attached a .cs with my implementation of the feature. I'm open to
critics and suggestions.

Cheers
Santiago.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221112/3db472d7/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5511-IsTextModelDirty-SantiagoSalvadorCubino-2022Nov12-17h59m-SSC.001.cs.st
Type: application/vnd.sailingtracker.track
Size: 941 bytes
Desc: not available
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20221112/3db472d7/attachment.bin>


More information about the Cuis-dev mailing list