Fix unneeded WordDB copy in complete_word

This commit is contained in:
Maxime Coste 2014-10-28 19:18:33 +00:00
parent efa276b13b
commit c2c980c484

View File

@ -107,7 +107,7 @@ InsertCompletion complete_word(const Buffer& buffer, ByteCoord cursor_pos)
{
if (buf.get() == &buffer)
continue;
auto buf_word_db = get_word_db(*buf);
auto& buf_word_db = get_word_db(*buf);
bufmatches = subseq ? buf_word_db.find_subsequence(prefix)
: buf_word_db.find_prefix(prefix);
matches.insert(bufmatches.begin(), bufmatches.end());