Fix preservation of entered text in option insert completer

This commit is contained in:
Maxime Coste 2015-10-30 13:08:07 +00:00
parent 34d7bdbc01
commit f556ef12c4

View File

@ -217,7 +217,7 @@ InsertCompletion complete_option(const Buffer& buffer, ByteCoord cursor_pos,
str_to_int({match[2].first, match[2].second}) - 1 }; str_to_int({match[2].first, match[2].second}) - 1 };
if (not buffer.is_valid(coord)) if (not buffer.is_valid(coord))
return {}; return {};
auto end = coord; auto end = cursor_pos;
if (match[3].matched) if (match[3].matched)
{ {
ByteCount len = str_to_int({match[3].first, match[3].second}); ByteCount len = str_to_int({match[3].first, match[3].second});