summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2016-03-17 12:07:20 +0000
committerMaxime Coste <frrrwww@gmail.com>2016-03-17 12:07:20 +0000
commitc6ca3af9b446ae50daea67d18d155f951ecaee94 (patch)
treee3b5e0ec608f95eed640c4755edec0bafbed6fa2
parent55ee6f970e52c841d4576279e079528a71b13c92 (diff)
Fix bug introduced in Buffer::do_insert
-rw-r--r--src/buffer.cc2
1 files changed, 1 insertions, 1 deletions
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);