-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only add properties for
prescient-sort-full-matches-first
to the fi…
…rst candidate. Only add properties to the first candidate, and search for the properties in the candidates list. This should be better than what we do now, which is to propertize every candidate and later get the properties from the first candidate in the list. For N candidates, the old way is always (propertize N) + (search 1) + (sort N) and the new way is (propertize 1) + (search (N - x)) + (sort N) where x is greater than or equal to 0. Assuming that `get-text-property` is no worse than `propertize` (which seems true in testing), the new way is never worse than the old way, and should usually be better. Add function `prescient--get-sort-info`, to complement `prescient--add-sort-info`.
- Loading branch information
Showing
2 changed files
with
54 additions
and
23 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