Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix panic in select_textobject_around (helix-editor#9832)
Test Document ------------- ``` a)b ``` Steps to Reproduce ------------------ 1. % # select_all 1. ms( # surround_add 1. mam # select_textobject_around Debug and Release ----------------- `thread 'main' panicked at 'Attempt to index past end of RopeSlice: char index 7, RopeSlice char length 6', ropey-1.6.1/src/slice.rs:796:13` Description ----------- An index was selected beyond the end of the slice with chars_at. The fix adds a guard check to `find_nth_open_pair`, like in the other find_nth* functions.
- Loading branch information