proton
proton copied to clipboard
Crash when sometimes escaping a list
Thread 1: "*** -[NSBigMutableString _getBlockStart:end:contentsEnd:forRange:stopAtLineSeparators:]: Range {7, 0} out of bounds; string length 6"
Basically I just go in, create a list and then hit enter to reproduce
@bryan1anderson, can you please provide detailed steps or the text that you are putting in the list? I am not able to recreate it with what you have mentioned.
I have similar Problems. A more detailed explanation:
- Create List
- Return (New line)
- Indent List
- Return (New line)
- Crash (
Thread 1: "*** -[NSBigMutableString _getBlockStart:end:contentsEnd:forRange:stopAtLineSeparators:]: Range {4, 0} out of bounds; string length 3")
It appears that in textViewDidChange(_ textView:) of RichTextEditorContext the richTextView.selectedRange is out of bounds and might cause the problems.

thank you for providing the steps @ChristopherAdelmann. I was able to narrow down and fix the crash. Please try the latest main.
https://user-images.githubusercontent.com/266423/230874885-2077e187-b93d-40dd-b69c-b92f09c135bf.mp4