move cursor back one character when exiting insert mode
This commit is contained in:
parent
95bd01cf7a
commit
a37e03fff1
@ -295,7 +295,10 @@ void BufferPane::handle_key(uint32_t keyval)
|
|||||||
if (keyval == '\033')
|
if (keyval == '\033')
|
||||||
{
|
{
|
||||||
m_buffer->exit_insert_mode();
|
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)
|
else if (keyval <= 0xFFu)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user