link from a piece table cursor object back to the containing piece table
This commit is contained in:
parent
728e389c1e
commit
abf853e1ba
@ -42,6 +42,7 @@ std::shared_ptr<PieceTable::Cursor> PieceTable::add_cursor()
|
||||
{
|
||||
auto cursor = std::make_shared<Cursor>();
|
||||
|
||||
cursor->piece_table = this;
|
||||
cursor->piece = start_piece->next;
|
||||
cursor->line_number = 0u;
|
||||
cursor->offset = 0u;
|
||||
|
@ -49,6 +49,9 @@ public:
|
||||
|
||||
struct Cursor
|
||||
{
|
||||
/** The piece table the cursor belongs to. */
|
||||
PieceTable * piece_table;
|
||||
|
||||
/** The piece. */
|
||||
Piece * piece;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user