I've written a small piece of
code for Atom editor to update a timestamp comment on certain files just before they are saved, and it works perfectly.
Unfortunately, this modification ends up, obviously, on Atom's undo stack, so if after saving these files I undo my changes, the timestamp is undone before the previous changes. For this reason I want to remove this timestamp update from the undo stack.
I know I can pack
multiple changes into a single undo transaction using
, but I can't find how to just remove last entry (or entries) from the undo stack.
Is the only solution to access directly the
and mess with the
? Frankly, right now I don't know which side-effects this can have, but I don't find anything in Atom API todo what I need.
Thanks a lot in advance, as always :)