From 11d86ca3f351dcaa870502ec2240a6acf53b8c29 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Wed, 5 Sep 2012 14:27:48 +0200 Subject: [PATCH] fix Selection::merge_with --- src/selection.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/selection.cc b/src/selection.cc index 6f483dc6..ebdea78f 100644 --- a/src/selection.cc +++ b/src/selection.cc @@ -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; }