[geary/wip/search-columns-714494] Fix case like from:"someone"



commit af558a0c3321456528c083f2d9a7ed9caef38d58
Author: Charles Lindsay <chaz yorba org>
Date:   Mon Dec 16 16:39:20 2013 -0800

    Fix case like from:"someone"

 src/engine/imap-db/imap-db-account.vala |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/imap-db/imap-db-account.vala b/src/engine/imap-db/imap-db-account.vala
index efd507c..3c0407f 100644
--- a/src/engine/imap-db/imap-db-account.vala
+++ b/src/engine/imap-db/imap-db-account.vala
@@ -702,7 +702,12 @@ private class Geary.ImapDB.Account : BaseObject {
                 --quotes;
             }
             
-            if (!in_quote) {
+            if (in_quote) {
+                // HACK: this helps prevent a syntax error when the user types
+                // something like from:"somebody".  If we ever properly support
+                // quotes after : we can get rid of this.
+                s = s.replace(":", " ");
+            } else {
                 string lower = s.down();
                 if (lower == "" || lower == "and" || lower == "or" || lower == "not" || lower == "near"
                     || lower.has_prefix("near/"))


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