2 ms·
Interesting, none of the editors I just tested (notepad / visual studio / sublime / github) works like this. I think of undo/redo as "time traveling", going ba
by danybittel 3y ago
Interesting, none of the editors I just tested (notepad / visual studio / sublime / github) works like this.
I think of undo/redo as "time traveling", going back to where I was one / two / several steps bevor. The mental model of your implementation is more akin of actually "doing" the undo. Like if you undo insert " world!", you create an action that deletes " world!". The timeline still goes forward, but now has a delete action.