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

ivy.el (ivy--reset-state): Use copy-sequence when sorting collection #1617

Closed
wants to merge 1 commit into from

Conversation

@ericdanan
Copy link
Contributor

commented Jun 11, 2018

This avoids modifications of external data that could be caused by
sorting with a collection function. Calling copy-sequence inside
ivy--reset-state rather than requiring the collection function to do
so has the advantage that it only happens if the collection is smaller
than ivy-sort-max-size, which limits the performance impact.

This is a follow up to #1592.

ivy.el (ivy--reset-state): Use copy-sequence when sorting collection
This avoids modifications of external data that could be caused by
sorting with a collection function.  Calling `copy-sequence` inside
`ivy--reset-state` rather than requiring the collection function to do
so has the advantage that it only happens if the collection is smaller
than `ivy-sort-max-size`, which limits the performance impact.

@abo-abo abo-abo closed this in 1c9bad2 Jun 14, 2018

@abo-abo

This comment has been minimized.

Copy link
Owner

commented Jun 14, 2018

Thanks.

@ericdanan ericdanan deleted the ericdanan:copy-sequence branch May 6, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.