diff options
author | Jacques Lucke <jacques@blender.org> | 2021-02-10 18:51:39 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-02-10 18:52:09 +0300 |
commit | 40a18612651873373ea267195ecc654e9fc344bb (patch) | |
tree | e6c9e66f5c090cbbfb293223ea74b760984c2473 /source/blender/blenlib | |
parent | 806b22d13093f7f90bc53849290db6b10a1cbe7e (diff) |
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.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r-- | source/blender/blenlib/intern/string_search.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/string_search.cc b/source/blender/blenlib/intern/string_search.cc index 22ba1b07e9c..a45909f92d8 100644 --- a/source/blender/blenlib/intern/string_search.cc +++ b/source/blender/blenlib/intern/string_search.cc @@ -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(); } } } |