Skip to content
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

Reverse changes if item is removed #179

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

the-bird-is-the-word
Copy link

@the-bird-is-the-word the-bird-is-the-word commented May 22, 2023

To fix #178, I think in function swap needs to be modified. If a swap is performed on a remove action, the list of changes needs to be reversed. Just like it is done in case of an add action.

What do you think?

I can also add some tests if you want. (I noticed that there are no tests on the revert or swap methods until now)

@jirikuncar
Copy link
Member

jirikuncar commented Jun 9, 2023

I can also add some tests if you want.

That would be awesome! And thank you for spotting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Removing more than two items from a list
2 participants