From c6ca3af9b446ae50daea67d18d155f951ecaee94 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 17 Mar 2016 12:07:20 +0000 Subject: [PATCH] Fix bug introduced in Buffer::do_insert --- src/buffer.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/buffer.cc b/src/buffer.cc index 858fba66..d96b727b 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -347,7 +347,7 @@ ByteCoord Buffer::do_insert(ByteCoord pos, StringView content) if (at_end) pos = append_lines ? line_count() : end_coord(); - const StringView prefix = at_end ? + const StringView prefix = append_lines ? StringView{} : m_lines[pos.line].substr(0, pos.column); const StringView suffix = at_end ? StringView{} : m_lines[pos.line].substr(pos.column);