Don't automatically remove common prefixes from suggestions

This commit is contained in:
Nathan Adams
2018-02-05 15:51:48 +01:00
parent 482e8601da
commit 182168acd5
4 changed files with 17 additions and 13 deletions
@@ -43,8 +43,7 @@ public class SuggestionsBuilder {
if (text.equals(remaining)) {
return this;
}
final String prefix = Strings.commonPrefix(text, remaining);
result.add(new Suggestion(StringRange.between(start + prefix.length(), input.length()), text.substring(prefix.length())));
result.add(new Suggestion(StringRange.between(start, input.length()), text));
return this;
}