Editor: fix move_selection(LineCount) when current column is after next line end
This commit is contained in:
parent
8606fdae5d
commit
4ad8941563
|
@ -181,7 +181,7 @@ void Editor::move_selections(LineCount offset, SelectMode mode)
|
||||||
CharCount column = utf8::distance(m_buffer->iterator_at_line_begin(pos.line), sel.last());
|
CharCount column = utf8::distance(m_buffer->iterator_at_line_begin(pos.line), sel.last());
|
||||||
pos.line += offset;
|
pos.line += offset;
|
||||||
BufferIterator last = utf8::advance(m_buffer->iterator_at_line_begin(pos.line),
|
BufferIterator last = utf8::advance(m_buffer->iterator_at_line_begin(pos.line),
|
||||||
m_buffer->iterator_at_line_end(pos.line), column);
|
m_buffer->iterator_at_line_end(pos.line)-1, column);
|
||||||
sel.first() = mode == SelectMode::Extend ? sel.first() : last;
|
sel.first() = mode == SelectMode::Extend ? sel.first() : last;
|
||||||
sel.last() = last;
|
sel.last() = last;
|
||||||
sel.avoid_eol();
|
sel.avoid_eol();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user