keep cursors off newlines after applying change operations when not in insert mode
This commit is contained in:
parent
3d090b0f32
commit
08529fc115
@ -241,11 +241,18 @@ size_t Buffer::lines_in_data(size_t offset, size_t length)
|
|||||||
|
|
||||||
void Buffer::post_warp_cursors()
|
void Buffer::post_warp_cursors()
|
||||||
{
|
{
|
||||||
for (auto cursor : m_cursors)
|
if (size() > 0u)
|
||||||
{
|
{
|
||||||
if ((*cursor == *m_eof_iterator) && (size() > 0u))
|
for (auto cursor : m_cursors)
|
||||||
{
|
{
|
||||||
cursor->go_back();
|
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