#include "selection.hh" #include "utf8.hh" namespace Kakoune { void Range::merge_with(const Range& 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