diff --git a/src/buffer.hh b/src/buffer.hh index 3da31952..979ae03f 100644 --- a/src/buffer.hh +++ b/src/buffer.hh @@ -68,8 +68,6 @@ public: const Buffer& buffer() const; const BufferCoord& coord() const { return m_coord; } - LineCount line() const { return m_coord.line; } - ByteCount column() const { return m_coord.column; } private: safe_ptr m_buffer; diff --git a/src/filters.cc b/src/filters.cc index a35a4502..c986b959 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -42,7 +42,7 @@ void expand_tabulations(Buffer& buffer, Selection& selection, String& content) { int column = 0; const auto position = buffer.iterator_at(selection.last()); - for (auto it = buffer.iterator_at(position.line()); + for (auto it = buffer.iterator_at(selection.last().line); it != position; ++it) { kak_assert(*it != '\n'); @@ -67,7 +67,7 @@ struct RegexFilter void operator() (Buffer& buffer, Selection& selection, String& content) { const auto position = buffer.iterator_at(selection.last()); - auto line_begin = buffer.iterator_at(position.line()); + auto line_begin = buffer.iterator_at(selection.last().line); boost::match_results results; if (boost::regex_match(content.c_str(), m_insert_match) and boost::regex_match(line_begin, position, results, m_line_match)) diff --git a/src/highlighters.cc b/src/highlighters.cc index 8e56c8eb..10d0bdff 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -235,7 +235,7 @@ void expand_tabulations(const Window& window, DisplayBuffer& display_buffer) atom_it = line.split(atom_it, (it+1).coord()); int column = 0; - for (auto line_it = buffer.iterator_at(it.line()); + for (auto line_it = buffer.iterator_at(line.buffer_line()); line_it != it; ++line_it) { kak_assert(*line_it != '\n');