Auto-complete sort does not prefer exactly matching prefix
The results from auto-complete do not put the match that has the exact prefix on top.
This bothers me, because my system has an unique two-letter code for each context to quickly enter actions. For example, I have the following contexts:
sc Steven - Computer
mc Meike - Computer
ac Allebei - Computer
Ongesorteerde acties
The last context is used to dump actions in for later processing. Now, suppose I enter a new action that I want to put in "Allebei - Computer". I'm used to typing "ac" in the context field, waiting for auto-complete to offer suggestions and then hit return to accept the first match. However, the first match will not be "ac Allebei - Computer" (the expected result) but "Ongesorteerde acties" (which also contains 'ac').
What should the sort order be? Am I right that exact prefixes should be preferred? Where in the code is this dealt with?
This bothers me, because my system has an unique two-letter code for each context to quickly enter actions. For example, I have the following contexts:
sc Steven - Computer
mc Meike - Computer
ac Allebei - Computer
Ongesorteerde acties
The last context is used to dump actions in for later processing. Now, suppose I enter a new action that I want to put in "Allebei - Computer". I'm used to typing "ac" in the context field, waiting for auto-complete to offer suggestions and then hit return to accept the first match. However, the first match will not be "ac Allebei - Computer" (the expected result) but "Ongesorteerde acties" (which also contains 'ac').
What should the sort order be? Am I right that exact prefixes should be preferred? Where in the code is this dealt with?
Leave a comment