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
parent bc1d8b677d
commit a1ca2a8539

View file

@ -281,7 +281,8 @@ const SystemActions = GObject.registerClass({
getMatchingActions(terms) {
// 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 = [];