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

tree-sitter: Update parent links on reused injection layers #10978

Merged
merged 1 commit into from
Jun 23, 2024

Commits on Jun 17, 2024

  1. tree-sitter: Update parent links on reused injection layers

    When parsing injections, we skip adding a new layer if there is an
    existing layer covering the same range. When doing so we did not update
    the parent layer ID, so some layers could have `parent` layer IDs that
    pointed to a layer that no longer existed in the `layers` HopSlotMap
    which could cause a panic when using `A-o`.
    
    To fix this we update the `parent` pointer for both newly created
    injection layers and reused ones.
    the-mikedavis committed Jun 17, 2024
    Configuration menu
    Copy the full SHA
    2e02306 View commit details
    Browse the repository at this point in the history