summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/StatusCache.cpp')
-rw-r--r--Swift/Controllers/StatusCache.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/Swift/Controllers/StatusCache.cpp b/Swift/Controllers/StatusCache.cpp
index ce69440..d3c8be5 100644
--- a/Swift/Controllers/StatusCache.cpp
+++ b/Swift/Controllers/StatusCache.cpp
@@ -31,7 +31,7 @@ StatusCache::~StatusCache() {
std::vector<StatusCache::PreviousStatus> StatusCache::getMatches(const std::string& substring, size_t maxCount) const {
std::vector<PreviousStatus> matches;
foreach (const PreviousStatus& status, previousStatuses_) {
- if (substring.empty() || boost::algorithm::ifind_first(status.first, substring)) {
+ if (substring.empty() || (boost::algorithm::ifind_first(status.first, substring) && substring != status.first)) {
matches.push_back(status);
if (matches.size() == maxCount) {
break;