Fix unneeded WordDB copy in complete_word
This commit is contained in:
parent
efa276b13b
commit
c2c980c484
|
@ -107,7 +107,7 @@ InsertCompletion complete_word(const Buffer& buffer, ByteCoord cursor_pos)
|
||||||
{
|
{
|
||||||
if (buf.get() == &buffer)
|
if (buf.get() == &buffer)
|
||||||
continue;
|
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)
|
bufmatches = subseq ? buf_word_db.find_subsequence(prefix)
|
||||||
: buf_word_db.find_prefix(prefix);
|
: buf_word_db.find_prefix(prefix);
|
||||||
matches.insert(bufmatches.begin(), bufmatches.end());
|
matches.insert(bufmatches.begin(), bufmatches.end());
|
||||||
|
|
Loading…
Reference in New Issue
Block a user