[gnome-shell] search: Don't run a full search for equal terms



commit 87495575bcbf10c92e01a2867d4157be57add193
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Fri Feb 15 23:15:13 2013 -0500

    search: Don't run a full search for equal terms
    
    Due to the timeout on the search entry, it's possible for
    a very quick edit to the entry to launch a subsearch on the
    same search string.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=693937

 js/ui/search.js |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/search.js b/js/ui/search.js
index c4eb10c..3dd59d7 100644
--- a/js/ui/search.js
+++ b/js/ui/search.js
@@ -66,6 +66,8 @@ const SearchSystem = new Lang.Class({
 
         let searchString = terms.join(' ');
         let previousSearchString = this._previousTerms.join(' ');
+        if (searchString == previousSearchString)
+            return;
 
         let isSubSearch = false;
         if (this._previousTerms.length > 0)


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