Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix panic in select_textobject_around #9832

Merged
merged 1 commit into from
Mar 7, 2024

Commits on Mar 7, 2024

  1. Fix panic in select_textobject_around

    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.
    trink committed Mar 7, 2024
    Configuration menu
    Copy the full SHA
    4f5f04f View commit details
    Browse the repository at this point in the history