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

Juan Vuletich juan at cuis.st
Tue Nov 15 09:16:41 PST 2022


On 11/12/2022 8:58 PM, Santiago Cubino via Cuis-dev wrote:
> 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.

Hi Santiago,

Welcome to the Cuis community!

Great contribution. The implementation is spot on. I just pushed it to 
github. I also added you as a known Cuis contributor.

Thanks!

-- 
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich



More information about the Cuis-dev mailing list