move cursor back one character when exiting insert mode

This commit is contained in:
josh committed 2016-12-26 09:03:26 -05:00
1 parent 95bd01cf7a
commit a37e03fff1
1 file changed
+4 -1
+4 -1
View File
@@ -295,7 +295,10 @@ void BufferPane::handle_key(uint32_t keyval)
if (keyval == '\033')
{
m_buffer->exit_insert_mode();
/* TODO: move cursor to last character in row if it was on EOL */
if (!m_iterator->is_start_of_line())
{
m_iterator->go_back();
}
}
else if (keyval <= 0xFFu)
{