From 723b96f624b04d2c7c0084d07a6de450c061de38 Mon Sep 17 00:00:00 2001 From: Josh Holtrop Date: Tue, 27 Dec 2016 14:07:46 -0500 Subject: [PATCH] fix insert position when erasing a code point in insert mode --- src/core/Buffer.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/Buffer.cc b/src/core/Buffer.cc index 52dd692..1e7caef 100644 --- a/src/core/Buffer.cc +++ b/src/core/Buffer.cc @@ -196,5 +196,9 @@ void Buffer::erase_code_point(const Buffer::Iterator & position) iterator->warp(-(ssize_t)bytes, lines); } } + if (m_insert_position > position.offset()) + { + m_insert_position -= bytes; + } } }