[gnome-characters] window: Reset the search state before searching



commit 391ba01eabaf114803e1029f4ff9baab220375b2
Author: Daiki Ueno <dueno src gnome org>
Date:   Wed Oct 4 15:36:58 2017 +0200

    window: Reset the search state before searching
    
    https://bugzilla.gnome.org/show_bug.cgi?id=788356

 src/window.js |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/window.js b/src/window.js
index 12b6914..07a5f0b 100644
--- a/src/window.js
+++ b/src/window.js
@@ -174,11 +174,10 @@ var MainWindow = new Lang.Class({
         let keywords = text == '' ? [] : text.split(/\s+/);
         keywords = keywords.map(String.toUpperCase);
         if (keywords != this._searchKeywords) {
+            this._mainView.cancelSearch();
             this._searchKeywords = keywords;
             if (this._searchKeywords.length > 0)
                 this._mainView.searchByKeywords(this._searchKeywords);
-            else
-                this._mainView.cancelSearch();
         }
         return true;
     },


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]