#include "selection.hh" #include "utf8.hh" #include "modification.hh" #include "buffer_utils.hh" namespace Kakoune { void Selection::merge_with(const Selection& range) { m_cursor = range.m_cursor; if (m_anchor < m_cursor) m_anchor = std::min(m_anchor, range.m_anchor); if (m_anchor > m_cursor) m_anchor = std::max(m_anchor, range.m_anchor); } namespace { template