From c2c980c4843effe4c76271290d0d6dc6cf540766 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 28 Oct 2014 19:18:33 +0000 Subject: [PATCH] Fix unneeded WordDB copy in complete_word --- src/insert_completer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/insert_completer.cc b/src/insert_completer.cc index da374d27..a35578c6 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -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());