Bug 571203 - Handle spaces in overlay search
Previously we were stripping all whitespace. Instead, just strip leading+trailing whitespace, split the remaining search into individual terms which we search for independently. Items are grouped by the number of terms they match, then sorted alphabetically.
This commit is contained in:
@@ -119,7 +119,8 @@ Sideshow.prototype = {
|
||||
if (me._searchQueued)
|
||||
return;
|
||||
Mainloop.timeout_add(250, function() {
|
||||
let text = me._searchEntry.text.replace(/\s/g, "");
|
||||
// Strip leading and trailing whitespace
|
||||
let text = me._searchEntry.text.replace(/^\s+/g, "").replace(/\s+$/g, "");
|
||||
me._searchQueued = false;
|
||||
me._searchActive = text != '';
|
||||
me._appDisplay.setSearch(text);
|
||||
|
Reference in New Issue
Block a user