less confusing code as actions are easy to distinguish
less chance of memory bugs as it only saves the data that needs to be changed opposed to the entire buffer
better stability as I've had a heck of a time with the current undo
easier debugging, actions are easier to trace
fixes duplicated data bug (very common with the current method)
similar to other editors (both OpenBSD's mg and Adam Saponara's mle editors use this method
faster, it's a lot quicker to copy <100 chars than thousands of chars
action packed because it use actions
There are many benefits to doing this:
- less confusing code as actions are easy to distinguish
- less chance of memory bugs as it only saves the data that needs to be changed opposed to the entire buffer
- better stability as I've had a heck of a time with the current undo
- easier debugging, actions are easier to trace
- fixes duplicated data bug (very common with the current method)
- similar to other editors (both OpenBSD's `mg` and Adam Saponara's `mle` editors use this method
- faster, it's a lot quicker to copy <100 chars than thousands of chars
- action packed because it use actions
There are many benefits to doing this:
mg
and Adam Saponara'smle
editors use this methodClosed with the action-based-undo branch. Merged in to master.