evenorog / undo

An undo-redo library.
https://docs.rs/undo
Apache License 2.0
49 stars 6 forks source link

Fix crash bug with Merged::Annul #13

Closed peterix closed 3 years ago

peterix commented 3 years ago

Fix crash bug when merged entries annul each other: (a -> b) | (b -> a) => nil needs to decrement the current counter, otherwise the next apply() operation will crash on at record.rs:195

evenorog commented 3 years ago

Thanks for the PR!

This does not compile though, i guess you meant self.current -= 1 instead?

peterix commented 3 years ago

Yeah ... well, I did it in the github web editor.