remove BufferIterator::{line,column}()

This commit is contained in:
Maxime Coste 2013-06-04 14:17:11 +02:00
parent ee22596d61
commit 51acd456cc
3 changed files with 3 additions and 5 deletions

View File

@ -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<const Buffer> m_buffer;

View File

@ -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<BufferIterator> results;
if (boost::regex_match(content.c_str(), m_insert_match) and
boost::regex_match(line_begin, position, results, m_line_match))

View File

@ -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');