summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2012-11-06 20:32:22 (GMT)
committerKevin Smith <git@kismith.co.uk>2012-12-23 11:46:06 (GMT)
commit90e22d09c0e7131744c9e343622013547319daf7 (patch)
treedecacff80e04696d9b28e24453025c894fa3a66d /Swift/Controllers
parent0c2cd2338ef77441e5b6b2a4cf1f5d6591c5f480 (diff)
downloadswift-90e22d09c0e7131744c9e343622013547319daf7.zip
swift-90e22d09c0e7131744c9e343622013547319daf7.tar.bz2
Avoid any duplicates in the status menu
Change-Id: I43ced9659bf16bce637f5f16f0987b2289d372a1
Diffstat (limited to 'Swift/Controllers')
-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;