From 8ddeb141c83b4ff7ca073707f807fab087fb35b3 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 30 May 2013 18:52:03 +0200 Subject: [PATCH] Fix insert completion at beginning of buffer --- src/input_handler.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input_handler.cc b/src/input_handler.cc index 5eae8db4..d76d3b14 100644 --- a/src/input_handler.cc +++ b/src/input_handler.cc @@ -610,7 +610,7 @@ public: for (auto& sel : m_context.editor().selections()) { auto offset = buffer.offset(sel.last()); - if (offset > beg_offset and offset + end_offset < buffer_len and + if (offset >= beg_offset and offset + end_offset < buffer_len and std::equal(sel.last() - beg_offset, sel.last(), begin)) { buffer.erase(sel.last() - beg_offset, sel.last() + end_offset);