systemActions: Flatten folded search terms

GLib.str_tokenize_and_fold() returns an array rather than a string
(the "tokenize" bit), so flatten the folded search terms like we
do for keywords.

https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/3169
This commit is contained in:
Florian Müllner 2020-09-12 18:27:45 +02:00 committed by Florian Müllner
parent de78ed980c
commit 59ade00b94

View File

@ -266,7 +266,8 @@ const SystemActions = GObject.registerClass({
getMatchingActions(terms) { getMatchingActions(terms) {
// terms is a list of strings // terms is a list of strings
terms = terms.map(term => GLib.str_tokenize_and_fold(term, null)[0]); terms = terms.map(
term => GLib.str_tokenize_and_fold(term, null)[0]).flat(2);
let results = []; let results = [];