add a PieceTable::Cursor to Window

This commit is contained in:
Josh Holtrop 2016-08-01 21:34:52 -04:00
parent e913c15212
commit 11cac3c8b5
2 changed files with 3 additions and 0 deletions

View File

@ -127,6 +127,7 @@ bool Window::create(std::shared_ptr<Buffer> buffer)
cursor_bounds, sizeof(cursor_bounds));
m_buffer = buffer;
m_cursor = m_buffer->piece_table->add_cursor();
m_start_piece = m_buffer->piece_table->start_piece->next;
resize();

View File

@ -40,6 +40,8 @@ protected:
std::shared_ptr<glcxx::Buffer> m_cursor_buffer;
std::shared_ptr<PieceTable::Cursor> m_cursor;
PieceTable::Piece * m_start_piece;
};