remove BufferIterator::offset
This commit is contained in:
parent
dbb1c57ec9
commit
ae947b456d
|
@ -71,7 +71,6 @@ public:
|
|||
const BufferCoord& coord() const { return m_coord; }
|
||||
LineCount line() const { return m_coord.line; }
|
||||
ByteCount column() const { return m_coord.column; }
|
||||
ByteCount offset() const;
|
||||
|
||||
private:
|
||||
safe_ptr<const Buffer> m_buffer;
|
||||
|
|
|
@ -68,12 +68,6 @@ inline char BufferIterator::operator*() const
|
|||
return m_buffer->at(m_coord);
|
||||
}
|
||||
|
||||
inline ByteCount BufferIterator::offset() const
|
||||
{
|
||||
kak_assert(m_buffer);
|
||||
return m_buffer->offset(m_coord);
|
||||
}
|
||||
|
||||
inline size_t BufferIterator::operator-(const BufferIterator& iterator) const
|
||||
{
|
||||
kak_assert(m_buffer == iterator.m_buffer);
|
||||
|
|
|
@ -605,7 +605,7 @@ public:
|
|||
BufferIterator begin{buffer, m_completions.begin};
|
||||
for (auto& sel : m_context.editor().selections())
|
||||
{
|
||||
auto offset = sel.last().offset();
|
||||
auto offset = buffer.offset(sel.last());
|
||||
if (offset > beg_offset and offset + end_offset < buffer_len and
|
||||
std::equal(sel.last() - beg_offset, sel.last(), begin))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user