1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-19 09:21:30 +03:00

fix Selection::merge_with

This commit is contained in:
Maxime Coste 2012-09-05 14:27:48 +02:00
parent bf42d77469
commit 11d86ca3f3

View File

@ -47,9 +47,9 @@ BufferIterator Selection::end() const
void Selection::merge_with(const Selection& selection)
{
if (m_first <= m_last)
if (m_first < m_last)
m_first = std::min(m_first, selection.m_first);
else
if (m_first > m_last)
m_first = std::max(m_first, selection.m_first);
m_last = selection.m_last;
}