-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 handling of ranges at file end. #3344
Fix handling of ranges at file end. #3344
Conversation
I've run into the same issue and can confirm it. Using your fix however leads to ALE breaking my code after renaming a variable with clangd. Here is what happens if I try to to rename Before: void Bar::setValue(int value) {
this->value = value;
} After: void Bar::setValue123(int value) { s->value = value; The new code is missing Edit: See #3322 |
@AlxHnr Can you propose another patch on top of this, and attach the output of |
Okay, I asked for the information I'll need in that issue. This patch can be merged once there's a test that covers this. Have a look at the test cases, or I'll do it myself at some point. (Could be weeks away from now. It's just whenever I have some spare time.) |
I'm puzzled. Looking through the tests ale/test/test_code_action.vader Line 179 in 08295ce
seems to directly test this. And indeed, in my setup this test already fails without my changes. To be more precise, I didn't run the test suite but did what the test essentially does:
So either this test already fails or there is something else at work. |
This pull request has been automatically marked as stale because it has not been updated recently. Make sure to write tests and document your changes. See |
I think this has been fixed in a different way according to recent changes. Let me know if you still have any issues. |
Apparently this is still needed, so I'll just merge it. Cheers! 🍻 |
Something along these lines solves the range ending at the file end in my case