GNOME Bugzilla – Bug 785942
Doesn't prefer start matches, makes typeahead impossible
Last modified: 2017-08-17 13:57:23 UTC
Created attachment 357107 [details] example from fedora26 showing the issue Using nautilus 3.24, when typing on the keyboard some text nautilus filters the matching folders but it doesn't rank start-matches higher which means you can't use a type-some-letter -> enter workflow (aka typeahead) to browse your subfolders as it used to be possible in nautilus
in the example the user wants to go to "aclocal" and type "ac + <enter>" and ends up in the emacs directory...
Created attachment 357341 [details] [review] query: prefer prefix matches over sufix matches Currently, the number of letters before and after the match decrease the rank of the search hit by the same amount. Though, the prefix matches should be prefered over the sufix ones, so make the number of letters after the match decrease the rank by a much smaller factor than the number of letters before the match.
Review of attachment 357341 [details] [review]: Cool! Just a nitpick: ::: src/nautilus-query.c @@ +400,3 @@ } + retval = MAX (10.0, 50.0 - (gdouble) (ptr - prepared_string) - (gdouble) nonexact_malus / 100); can we you put a comment and also names to the constants? It's becoming a little hard to understand at first glance.
Created attachment 357648 [details] [review] query: prefer prefix matches over sufix matches Currently, the number of letters before and after the match decrease the rank of the search hit by the same amount. Though, the prefix matches should be prefered over the sufix ones, so make the number of letters after the match decrease the rank by a much smaller factor than the number of letters before the match.
Review of attachment 357648 [details] [review]: Excellent, thanks!
Attachment 357648 [details] pushed as a6d616e - query: prefer prefix matches over sufix matches