core icon indicating copy to clipboard operation
core copied to clipboard

Add Undo package using general-purpose diff records

Open rcoreilly opened this issue 7 years ago • 1 comments

  • 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..

rcoreilly avatar Aug 20 '18 08:08 rcoreilly

this is the more appropriate lib for this purpose: https://github.com/pmezard/go-difflib/difflib -- using in textbuf

rcoreilly avatar Sep 24 '18 06:09 rcoreilly

@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?

kkoreilly avatar Aug 05 '23 21:08 kkoreilly

undo is used in grid.

rcoreilly avatar Aug 22 '23 23:08 rcoreilly