core
core copied to clipboard
Add Undo package using general-purpose diff records
- undo sub-package within gi
- use diff package (prob this: https://github.com/sergi/go-diff) on top of json outputs, as in emergent diffmgr
- map of diff records for each top-level entity -- can be many of these in parallel (e.g., textfield vs. ki tree etc)
- records themselves are sequential slices of diff records and commands, with same logic as emergent
- diffing happens in separate routine..
this is the more appropriate lib for this purpose: https://github.com/pmezard/go-difflib/difflib -- using in textbuf
@rcoreilly, you have made an undo subpackage in gi and a fork of go-difflib (goki/go-difflib), and you use the go-difflib fork but don't seem to use the undo package anywhere. Can this issue be closed and/or the undo subpackage removed?
undo is used in grid.