keep cursors off newlines after applying change operations when not in insert mode
This commit is contained in:
parent
3d090b0f32
commit
08529fc115
@ -240,13 +240,20 @@ size_t Buffer::lines_in_data(size_t offset, size_t length)
|
||||
}
|
||||
|
||||
void Buffer::post_warp_cursors()
|
||||
{
|
||||
if (size() > 0u)
|
||||
{
|
||||
for (auto cursor : m_cursors)
|
||||
{
|
||||
if ((*cursor == *m_eof_iterator) && (size() > 0u))
|
||||
if (*cursor == *m_eof_iterator)
|
||||
{
|
||||
cursor->go_back();
|
||||
}
|
||||
if ((!insert_mode()) && (**cursor == '\n'))
|
||||
{
|
||||
cursor->go_left_in_line();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user