-
-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Speed up counsel-yank-pop on large kill-ring
cl-delete-duplicates rapidly slows down on large inputs. Alternatives to the approach in this patch: - Avoid deduplication beyond a certain threshold. - Deduplicate only when kill-do-not-save-duplicates is non-nil. - Make equality test customizable. - Ignore text properties by default. * counsel.el (counsel--idx-of): New macro. (counsel--yank-pop-position): Use it. (counsel-string-non-blank-p): Simplify. (counsel--equal-w-props, counsel--yank-pop-filter): New functions for replicating delete-dups under equal-including-properties (#3045). (counsel--yank-pop-kills): Use counsel--yank-pop-filter. (counsel-yank-pop-action-remove): Prefer setq over set. * ivy-test.el (counsel-string-non-blank-p, counsel--equal-w-props) (counsel--yank-pop-filter): New tests. Fixes #3040.
- Loading branch information
1 parent
28ac6c7
commit d8dace9
Showing
2 changed files
with
101 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters