[tracker] Fixes GB#619487: re-enable search with terms that got _underscores



commit e2b1b49e776d4793f51a260720eac93b50e6c61c
Author: Tshepang Lekhonkhobe <tshepang gmail com>
Date:   Mon May 24 10:31:52 2010 +0200

    Fixes GB#619487: re-enable search with terms that got _underscores

 src/tracker-search-tool/tracker-entry.gs |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/tracker-search-tool/tracker-entry.gs b/src/tracker-search-tool/tracker-entry.gs
index a27a175..4b44ff9 100644
--- a/src/tracker-search-tool/tracker-entry.gs
+++ b/src/tracker-search-tool/tracker-entry.gs
@@ -86,6 +86,8 @@ class TrackerSearchEntry  : ComboBoxEntry implements Gtk.Activatable
 
             /* remove leading non-alphanumeric chars */
             while(!txt[0].isalnum())
+                if txt[0] == '_'
+                    break
                 txt = txt.slice(1, len--)
                 if len < 3
                     return false
@@ -93,6 +95,8 @@ class TrackerSearchEntry  : ComboBoxEntry implements Gtk.Activatable
             /* remove trailing non-alphanumeric chars */
             if(!txt[len - 1].isalnum())
                 while(!txt[len - 2].isalnum())
+                    if txt[len - 2] == '_'
+                        break
                     txt = txt.slice(0, len - 2)
                     len--
                     if len < 3



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