From b1ba7fc4d23e8f68eeadcdd4622c10f8caed19e1 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 29 Apr 2014 23:48:46 +0100 Subject: [PATCH] Fix word completion that replaced the whole current word Only replace up to the cursor. --- 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 2cf687bc..5648bf17 100644 --- a/src/insert_completer.cc +++ b/src/insert_completer.cc @@ -72,7 +72,7 @@ InsertCompletion complete_word(const Buffer& buffer, BufferCoord cursor_pos) std::copy(matches.begin(), matches.end(), inserter(result, result.begin())); std::sort(result.begin(), result.end()); - return { begin.coord(), end.coord(), std::move(result), buffer.timestamp() }; + return { begin.coord(), cursor_pos, std::move(result), buffer.timestamp() }; } template