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] Fix proliferation of extra injection layers #783

Conversation

savetheclocktower
Copy link
Contributor

…starting with a big important fix for #756.

…esults

When determining the possible breadth of injection layers that could be affected by a buffer change, I assumed that `MarkerLayer#findMarkers` would return results such that I could take the first result's start and the last result's end and end up with a range that containd all the results.

pulsar-edit#756 proved that not to be true, at least in the case of Clojure — the effect of which is that lots of injection layers were getting ignored during the step where we decide whether to reuse existing layers or create new ones. That led to an ever-increasing number of injection layers being created.

Instead, we need to find the minimum and maximum points in the set and use that as the range.
@savetheclocktower savetheclocktower linked an issue Oct 21, 2023 that may be closed by this pull request
5 tasks
@savetheclocktower savetheclocktower changed the title Tree-sitter October fixes [tree-sitter] Fix proliferation of extra injection layers Oct 22, 2023
@savetheclocktower
Copy link
Contributor Author

Converting this to a single-issue PR so we can get it reviewed sooner.

@savetheclocktower savetheclocktower merged commit 87bb06b into pulsar-edit:master Oct 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modern Tree-Sitter - duplicating scopes when deleting/undoing
3 participants