A scroll gets triggered before the selections change but after the text is modified, leading to an out of bounds exception. We either need to just do a sanity check (the cheap fix) or somehow figure out how to defer the scroll or make the selection update happen beforehand. Alternatively, the -scrollViewDidScroll: side-effects could be wrapped in a dispatch_async(), another cheap fix.
A scroll gets triggered before the selections change but after the text is modified, leading to an out of bounds exception. We either need to just do a sanity check (the cheap fix) or somehow figure out how to defer the scroll or make the selection update happen beforehand. Alternatively, the -scrollViewDidScroll: side-effects could be wrapped in a dispatch_async(), another cheap fix.