-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add consecutive redos test case #1
base: main
Are you sure you want to change the base?
Add consecutive redos test case #1
Conversation
@@ -216,6 +216,10 @@ export class AutomergeRepoUndoRedo<T> { | |||
}); | |||
|
|||
if (heads) { | |||
if (stack.redos.length > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this fixes the can apply consecutive redos on untracked text
test and it does makes sense in my head I guess
@@ -174,7 +174,7 @@ export class AutomergeRepoUndoRedo<T> { | |||
heads, | |||
); | |||
|
|||
change.redo.patches = unpatchAll(before, patches); | |||
// change.redo.patches = unpatchAll(before, patches); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this one fixes the can apply redos and undos
but at the same time it breaks the local undo + global redo
test
Can you just clarify what you are hoping to test for here? Is the idea that you have 2 peers, one makes changes, then the other. You then undo twice on the first peer, and then redo twice and would expect to return to the same value? |
@acurrieclark yes, I think that is the expected behavior, isn't it? |
It is, absolutely! I was just trying to work out if the test makes changes in the way I expected. I'll take a look and let you know. Thanks again! |
Add consecutive redos test case