diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2014-04-29 23:48:46 +0100 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2014-04-29 23:48:46 +0100 |
| commit | b1ba7fc4d23e8f68eeadcdd4622c10f8caed19e1 (patch) | |
| tree | ab35df38a53a1103cf6c9c71f53077766c3e6369 /src | |
| parent | 479c067a4096f440398f531c11e4eae802ffe7c9 (diff) | |
Fix word completion that replaced the whole current word
Only replace up to the cursor.
Diffstat (limited to 'src')
| -rw-r--r-- | src/insert_completer.cc | 2 |
1 files changed, 1 insertions, 1 deletions
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<bool require_slash> |
