Skip to content

Commit 93e9654

Browse files
authored
Normalize start Text pointer to support Text Cursor Indicator (#10333)
* Normalize start Text pointer at boundingrectangles * Fix Invariance in TextAdaptor
1 parent 85319c2 commit 93e9654

File tree

1 file changed

+3
-0
lines changed
  • src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls

1 file changed

+3
-0
lines changed

src/Microsoft.DotNet.Wpf/src/PresentationFramework/System/Windows/Controls/TextAdaptor.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,9 @@ internal Rect[] GetBoundingRectangles(ITextPointer start, ITextPointer end, bool
112112
return Array.Empty<Rect>();
113113
}
114114

115+
start = start.CreatePointer();
116+
end = end.CreatePointer();
117+
115118
TextRangeAdaptor.MoveToInsertionPosition(start, LogicalDirection.Forward);
116119
TextRangeAdaptor.MoveToInsertionPosition(end, LogicalDirection.Backward);
117120

0 commit comments

Comments
 (0)