diff options
| author | Maxime Coste <frrrwww@gmail.com> | 2016-03-17 12:07:20 +0000 |
|---|---|---|
| committer | Maxime Coste <frrrwww@gmail.com> | 2016-03-17 12:07:20 +0000 |
| commit | c6ca3af9b446ae50daea67d18d155f951ecaee94 (patch) | |
| tree | e3b5e0ec608f95eed640c4755edec0bafbed6fa2 /src/buffer.cc | |
| parent | 55ee6f970e52c841d4576279e079528a71b13c92 (diff) | |
Fix bug introduced in Buffer::do_insert
Diffstat (limited to 'src/buffer.cc')
| -rw-r--r-- | src/buffer.cc | 2 |
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); |
