Fix T85514: exact match is not showing up in search menu

The `get_shortest_word_index_that_startswith` function was not doing
what it was supposed to do. This resulted in wrong matches.
This commit is contained in:
Jacques Lucke 2021-02-10 16:51:39 +01:00
parent 806b22d130
commit 40a1861265

View file

@ -259,6 +259,7 @@ static int get_shortest_word_index_that_startswith(StringRef query,
if (word.startswith(query)) {
if (word.size() < best_word_size) {
best_word_index = i;
best_word_size = word.size();
}
}
}