Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions lib/src/document/nodes/node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ abstract base class Node extends LinkedListEntry<Node> {

Node clone() => newInstance()..applyStyle(style);

Node cloneWithOffset() => clone()..parent = parent.._offset = offset;

int? _offset;

/// Offset in characters of this node relative to [parent] node.
Expand Down
2 changes: 1 addition & 1 deletion lib/src/editor/widgets/text/text_line.dart
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class _TextLineState extends State<TextLine> {
}

// here child is Text node and its value is cloned
textNodes.add(child.clone());
textNodes.add(child.cloneWithOffset());
}

if (textNodes.isNotEmpty) {
Expand Down
Loading