[geary/wip/search-columns-714494] Properly handle incomplete "field:"



commit 5bdbaff2f8ddb915e65674b5b8f408a8229384de
Author: Charles Lindsay <chaz yorba org>
Date:   Mon Dec 16 15:11:31 2013 -0800

    Properly handle incomplete "field:"

 src/engine/imap-db/imap-db-account.vala |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index c24cf4c..efd507c 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -649,6 +649,12 @@ private class Geary.ImapDB.Account : BaseObject {
         /// messages received by a particular person.
         field_names.set(_("to"), "receivers");
         
+        // If they stopped at "field:", treat it as if they hadn't typed the :
+        if (Geary.String.is_empty_or_whitespace(parts[1])) {
+            token = parts[0];
+            return null;
+        }
+        
         string key = parts[0].down();
         if (key in field_names.keys) {
             token = parts[1];


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