diff --git a/src/buffer.cc b/src/buffer.cc index e2d01201..3e510422 100644 --- a/src/buffer.cc +++ b/src/buffer.cc @@ -74,11 +74,11 @@ void Buffer::reload(std::vector lines, time_t fs_timestamp) for (auto listener : m_change_listeners) listener->on_erase(*this, {0,0}, end_coord()); - m_history.clear(); - m_current_undo_group.clear(); - m_history_cursor = m_history.begin(); - m_last_save_undo_index = 0; - m_lines.clear(); + m_history.clear(); + m_current_undo_group.clear(); + m_history_cursor = m_history.begin(); + m_last_save_undo_index = 0; + m_lines.clear(); ++m_timestamp; if (lines.empty()) diff --git a/src/selectors.cc b/src/selectors.cc index 91869c5c..509c79a5 100644 --- a/src/selectors.cc +++ b/src/selectors.cc @@ -141,16 +141,16 @@ Selection select_surrounding(const Buffer& buffer, const Selection& selection, CodepointPair matching, int level, ObjectFlags flags) { - const bool nestable = matching.first != matching.second; - auto pos = selection.last(); - if (not nestable or flags & ObjectFlags::Inner) - { + const bool nestable = matching.first != matching.second; + auto pos = selection.last(); + if (not nestable or flags & ObjectFlags::Inner) + { if (auto res = find_surrounding(buffer, pos, matching, flags, level)) return *res; return selection; - } + } - auto c = buffer.byte_at(pos); + auto c = buffer.byte_at(pos); if ((flags == ObjectFlags::ToBegin and c == matching.first) or (flags == ObjectFlags::ToEnd and c == matching.second)) ++level;