handle Delete key in insert mode properly
This commit is contained in:
parent
62e127d400
commit
3d090b0f32
@ -415,7 +415,7 @@ void BufferPane::insert_code_point(uint32_t code_point)
|
||||
{
|
||||
if (insert_mode())
|
||||
{
|
||||
if (code_point == '\b')
|
||||
if (code_point == '\b') /* Backspace */
|
||||
{
|
||||
Buffer::Iterator i = *m_iterator;
|
||||
i.go_back();
|
||||
@ -424,6 +424,10 @@ void BufferPane::insert_code_point(uint32_t code_point)
|
||||
m_buffer->erase_code_point(i);
|
||||
}
|
||||
}
|
||||
else if (code_point == 127) /* Delete */
|
||||
{
|
||||
m_buffer->erase_code_point(*m_iterator);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (code_point == '\r')
|
||||
|
Loading…
x
Reference in New Issue
Block a user