aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 14:54:02 +0000
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-12-04 14:54:02 +0000
commitcc36e7cca2b441437ae16cb9f3096f42c75c69e7 (patch)
tree030800d8fd76a08e2acce77d0ed8f0d244989a0a
parent484760a15589b8c49a773d95cfa795977b7c8718 (diff)
downloadpaludis-cc36e7cca2b441437ae16cb9f3096f42c75c69e7.tar.gz
paludis-cc36e7cca2b441437ae16cb9f3096f42c75c69e7.tar.xz
Only show substring suggestions for length >= 3
Fixes: ticket:1053
-rw-r--r--paludis/fuzzy_finder.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/paludis/fuzzy_finder.cc b/paludis/fuzzy_finder.cc
index 1e7480b..085e2b6 100644
--- a/paludis/fuzzy_finder.cc
+++ b/paludis/fuzzy_finder.cc
@@ -97,7 +97,7 @@ namespace
for (QualifiedPackageNameSet::ConstIterator p(pkgs->begin()),
p_end(pkgs->end()); p_end != p; ++p)
- if (std::string::npos != stringify(p->package()).find(_package) || (
+ if (((_package.length() >= 3) && (std::string::npos != stringify(p->package()).find(_package))) || (
tolower(p->package().value()[0]) == _first_char &&
_distance_calculator.distance_with(tolower_0_cost(p->package().value())) <= _threshold))
result->insert(*p);