Skip to content

Commit 0b63478

Browse files
committed
menu applet: Strip the spaces from button search strings.
We strip the pattern, so in order to get a match against buttons with spaces in their search strings we have to strip them as well. Ref: linuxmint/mint21-beta#99
1 parent eafc411 commit 0b63478

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

files/usr/share/cinnamon/applets/[email protected]/applet.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,9 +566,9 @@ class ApplicationButton extends GenericApplicationButton {
566566
this.isDraggableApp = true;
567567

568568
this.searchStrings = [
569-
AppUtils.decomp_string(app.get_name()),
569+
AppUtils.decomp_string(app.get_name()).replace(/\s/g, ''),
570570
app.get_keywords() ? AppUtils.decomp_string(app.get_keywords()) : "",
571-
app.get_description() ? AppUtils.decomp_string(app.get_description()) : "",
571+
app.get_description() ? AppUtils.decomp_string(app.get_description()).replace(/\s/g, '') : "",
572572
app.get_id() ? AppUtils.decomp_string(app.get_id()) : ""
573573
];
574574
}
@@ -666,7 +666,7 @@ class PlaceButton extends SimpleMenuItem {
666666
this.addLabel(this.name, 'menu-application-button-label');
667667

668668
this.searchStrings = [
669-
AppUtils.decomp_string(place.name)
669+
AppUtils.decomp_string(place.name).replace(/\s/g, '')
670670
];
671671
}
672672

@@ -718,7 +718,7 @@ class RecentButton extends SimpleMenuItem {
718718
this.addLabel(this.name, 'menu-application-button-label');
719719

720720
this.searchStrings = [
721-
AppUtils.decomp_string(recent.name)
721+
AppUtils.decomp_string(recent.name).replace(/\s/g, '')
722722
];
723723
}
724724

@@ -826,7 +826,7 @@ class FavoriteButton extends SimpleMenuItem {
826826
this.addLabel(this.name, 'menu-application-button-label');
827827

828828
this.searchStrings = [
829-
AppUtils.decomp_string(favoriteInfo.display_name)
829+
AppUtils.decomp_string(favoriteInfo.display_name).replace(/\s/g, '')
830830
];
831831
}
832832

0 commit comments

Comments
 (0)