Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix multiple text edit handling for a single document #89

Merged

Conversation

NipunaRanasinghe
Copy link
Contributor

@NipunaRanasinghe NipunaRanasinghe commented Jun 11, 2019

Purpose

When applying multiple text edits in a single file, all the other edit ranges will be invalid after the very first edit, since the document is changed after the first text edit apply. This PR adds a fix by creating a sorted edit list based on the insertion position and the edits will be applied from the bottom to the top of the document.

Fixes ballerina-platform/ballerina-lang#15653.

@NipunaRanasinghe NipunaRanasinghe requested a review from rasika June 11, 2019 08:28
@rasika rasika merged commit 2ff446b into ballerina-platform:master Jun 11, 2019
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Document All" Code action does not work as expected in ballerina IntelliJ plugin
2 participants