Hard-code minimum suggestion distance to 4
This way only close matches are suggested.
This commit is contained in:
parent
809d3549ae
commit
7d54df74dc
@ -5029,8 +5029,9 @@ std::string closest_matching_parameter(const std::string& str,
|
||||
}
|
||||
|
||||
std::string rval;
|
||||
const int min_dist = 4;
|
||||
|
||||
if (lowest < (int)std::min(str.length(), name.length()))
|
||||
if (lowest <= min_dist)
|
||||
{
|
||||
rval = "Did you mean '" + name + "'?";
|
||||
name.clear();
|
||||
|
Loading…
x
Reference in New Issue
Block a user