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