Conversation
main.go
Outdated
| } | ||
| } | ||
|
|
||
| func (m *model) createTombstone(at *Node) Tombstone { |
There was a problem hiding this comment.
Looks like this method does not uses any model fields. Lets move it to josnx package?
main.go
Outdated
| } | ||
|
|
||
| // if it was the first child | ||
| if t.Parent != nil && t.Parent.Next == t.Next { |
There was a problem hiding this comment.
The logic on undo will be nice to put to jsonx package as well.
|
Implementation is nice, but lets move all model independent parts to nodes. And lets add tests! JSON -> delete node -> assert JSON -> redo node -> assert JSON |
|
thanks for the comments / review @antonmedv. really solid points. on it! |
|
hi @antonmedv |
But do we really need redo? |
hmm. |
|
Plus since we already implemented Tombstone, the redo is a relatively straightforward implementation. |
|
what about instead of key binding, use command :u |
might feel slightly off for vim users. could work though. they'll just have to read the docs. also, when you say command+u, do you mean cmd/alt+u for redo? or ctrl+u for redo? |
|
I see. Ok, lets keep u. Please rebase! |
87b98fc to
b82bd68
Compare
Just rebased. No conflicts with master! |
Undo/Redo for Node Deletion
Fixes #370
New Keybindings (vim-like):
Testing Performed