From ab2adf7e70782f0972ede76fac8a42be62877ab0 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Sat, 16 May 2020 13:25:25 +0200 Subject: [PATCH] In quick filter, treat ! and : as literal characters when inside quotes (#43) --- src/data/filter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/data/filter.cpp b/src/data/filter.cpp index d187510a..116cb0f3 100644 --- a/src/data/filter.cpp +++ b/src/data/filter.cpp @@ -25,10 +25,10 @@ vector parse_quicksearch_query(String const& query) { } else if (c == _('"')) { // begin/end quoted string, match exactly quoted = !quoted; - } else if (c == _(':') && part.type.empty()) { + } else if (c == _(':') && part.type.empty() && !quoted) { part.type = part.query; part.query.clear(); - } else if (c == _('!') && part.query.empty() && part.type.empty()) { + } else if (c == _('!') && part.query.empty() && part.type.empty() && !quoted) { // negate part.need_match = false; } else {