add 'g' and 'G' commands to go to first and last line in buffer

This commit is contained in:
josh committed 2016-12-28 14:07:28 -05:00
1 parent 8df75f5ab0
commit 237dbf9c2b
3 files changed
+40 -2

No files matched your search

+4 -2
View File
@@ -19,7 +19,7 @@ public:
INVALID_CODE_POINT = 0xFFFFFFFFu,
};
Iterator(Buffer * buffer)
Iterator(const Buffer * buffer)
{
m_buffer = buffer;
m_offset = 0u;
@@ -87,7 +87,7 @@ public:
size_t offset() const { return m_offset; }
protected:
Buffer * m_buffer;
const Buffer * m_buffer;
size_t m_offset;
size_t m_line;
};
@@ -114,6 +114,8 @@ public:
void insert_code_point(uint32_t code_point, bool adjust_iterators = true);
void erase_code_point(const Buffer::Iterator & position);
std::string filename() const { return m_filename; }
Iterator begin() const { return Iterator(this); }
Iterator end() const { return *m_eof_iterator; }
protected:
bool m_eol_at_eof;