diff --git a/src/application.js b/src/application.js index 62e5fa0cb1c35c990488692af45b0e450c33dbbd..a33601510d514b557d1004d3236d094fc57d7bd9 100644 --- a/src/application.js +++ b/src/application.js @@ -252,8 +252,8 @@ export class Application extends Adw.Application { if (error) { this._mainWindow.showToast(_("An error has occurred")); } else { - // clear search entry - this._mainWindow.searchBar.text = ''; + // fill in search entry with query string + this._mainWindow.searchBar.setTextWithoutTriggeringSearch(query); if (places) { /* if there's only one place in results, show it directly diff --git a/src/placeEntry.js b/src/placeEntry.js index 6138b6ba2b3cfbfc4a5f68f5789c6e1e3c3a08da..e2bde9b2e1aca8b19f23acabe542976b6b64f7b4 100644 --- a/src/placeEntry.js +++ b/src/placeEntry.js @@ -71,7 +71,7 @@ export class PlaceEntry extends Gtk.Entry { } if (this.text !== this._placeText) - this._setTextWithoutTriggerSearch(this._placeText); + this.setTextWithoutTriggeringSearch(this._placeText); this._place = p; @@ -125,7 +125,7 @@ export class PlaceEntry extends Gtk.Entry { this.add_css_class('search'); } - _setTextWithoutTriggerSearch(text) { + setTextWithoutTriggeringSearch(text) { this._setText = text; this.text = text; }