a4f7d02a3b
Correct FixIt chunks sorting While playing with FixIts in C++, I found the following issue. When fixing the third line in the code: ```cpp template<int Value> struct CT { template<typename> struct Inner; }; CT<10 >> 2> ct; // expected-warning{{require parentheses}} ``` the following result is obtained: ```cpp CT<1(0 >> 2)> ct; // expected-warning{{require parentheses}} ``` which is obviously wrong. The issue is YouCompleteMe does not replace the chunks in the right order. It starts by adding the closing parenthesis, add one to the delta and inserts the opening parenthesis in the wrong place cause of the delta. We actually use the expression `str(line) + ',' + str(column)` to sort the chunks by line then column whereas it should simply be `(line, column)`. This PR fixes this issue, adds two tests which are failing in the current version, refactors the `_HandleFixitResponse` function and cleans up code. |
||
---|---|---|
.. | ||
ycm | ||
test_requirements.txt |