File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,9 @@ abstract class Node extends LinkedListEntry<Node> {
53
53
54
54
/// Offset in characters of this node in the document.
55
55
int get documentOffset {
56
+ if (parent == null ) {
57
+ return offset;
58
+ }
56
59
final parentOffset = (parent is ! Root ) ? parent! .documentOffset : 0 ;
57
60
return parentOffset + offset;
58
61
}
Original file line number Diff line number Diff line change @@ -625,11 +625,11 @@ class RenderEditableTextLine extends RenderEditableBox {
625
625
final verticalPadding = _resolvedPadding! .top + _resolvedPadding! .bottom;
626
626
final leadingWidth = _leading == null
627
627
? 0
628
- : _leading! .getMinIntrinsicWidth (height - verticalPadding) as int ;
628
+ : _leading! .getMinIntrinsicWidth (height - verticalPadding). floor () ;
629
629
final bodyWidth = _body == null
630
630
? 0
631
631
: _body! .getMinIntrinsicWidth (math.max (0 , height - verticalPadding))
632
- as int ;
632
+ . floor () ;
633
633
return horizontalPadding + leadingWidth + bodyWidth;
634
634
}
635
635
@@ -640,11 +640,11 @@ class RenderEditableTextLine extends RenderEditableBox {
640
640
final verticalPadding = _resolvedPadding! .top + _resolvedPadding! .bottom;
641
641
final leadingWidth = _leading == null
642
642
? 0
643
- : _leading! .getMaxIntrinsicWidth (height - verticalPadding) as int ;
643
+ : _leading! .getMaxIntrinsicWidth (height - verticalPadding). ceil () ;
644
644
final bodyWidth = _body == null
645
645
? 0
646
646
: _body! .getMaxIntrinsicWidth (math.max (0 , height - verticalPadding))
647
- as int ;
647
+ . ceil () ;
648
648
return horizontalPadding + leadingWidth + bodyWidth;
649
649
}
650
650
You can’t perform that action at this time.
0 commit comments