You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using RichTextArea.Buffer.Delete(new Range<int>(0,3)) I expect the first 3 characters in the RichTextArea to be deleted from its buffer.
Actual Behavior
No matter the validity of the range, the method throws an ArgumentNullException when the PresentationFramework seems to evaluate the inner _textData to set.
Steps to Reproduce the Problem
Create a RichTextArea.
Fill it with text.
Try to delete a valid range of it by the Delete method on its Buffer.
Specifications
Version: 2.5.11, latest develop version
Platform(s): WPF (could be an issue on other platforms)
Operating System(s): Windows 10 64bit
Fix
PR #2006 fixes this issue by setting the Text property of the text range retrieved by the control handler to string.Empty instead of null. After some tests, this exudes the expected behaviour and doesn't seem to cause any side effects on the remaining text, regarding formatting or selection.
The text was updated successfully, but these errors were encountered:
Expected Behavior
When using
RichTextArea.Buffer.Delete(new Range<int>(0,3))
I expect the first 3 characters in the RichTextArea to be deleted from its buffer.Actual Behavior
No matter the validity of the range, the method throws an
ArgumentNullException
when the PresentationFramework seems to evaluate the inner_textData
to set.Steps to Reproduce the Problem
Specifications
Fix
PR #2006 fixes this issue by setting the
Text
property of the text range retrieved by the control handler tostring.Empty
instead ofnull
. After some tests, this exudes the expected behaviour and doesn't seem to cause any side effects on the remaining text, regarding formatting or selection.The text was updated successfully, but these errors were encountered: