-
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.
Fix and improve sorting full matches first under some conditions.
- Change the property list to use normal keys. - Change `prescient-regexps` to `:prescient-match-regexps`. - Add `:prescient-all-regexps`, which we need for proper sorting. - Test the each regexp produced by a filter method separately. Do not just re-use the regexps that were used for filtering. - Fix `prefix` with `:with-group` when the first character of the query is a word character. Make sure to not accidentally match the middle of a word. - Tweak the `prefix` filter method to better work with `prescient-sort-full-matches-first` and avoid conflicts when trying to use an initialism. Don't use greedy matching when there are no non-word characters. 1. "re" only matches "re" at the start of the word "repeat", not the entire word. Otherwise, we run into conflicts when we want "re" to be an initialism for a longer command name, such as "restart-emacs". 2. ".g" fully matches ".git". 3. "s-r" fully matches "string-rectangle", not just "string-r". This can't conflict with `initialism`, so there is no harm in assuming that the "r" is meant to match an entire word, just like the "s" does.
- Loading branch information
Showing
3 changed files
with
123 additions
and
74 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
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