diff --git a/src/input_handler.cc b/src/input_handler.cc index 802f047b..037bcdcf 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -771,11 +771,17 @@ public: String prefix{begin, end}; + while (end != buffer.end() and is_word(*end)) + ++end; + + String current_word{begin, end}; std::unordered_set matches; auto bufmatches = get_word_db(buffer).find_prefix(prefix); matches.insert(bufmatches.begin(), bufmatches.end()); + matches.erase(current_word); + if (other_buffers) { for (const auto& buf : BufferManager::instance())