YouCompleteMe/python/ycm
Homu a4f7d02a3b Auto merge of #1676 - micbou:fix-it-chunks-sorting, r=Valloric
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.
2015-09-13 13:48:54 +09:00
..
client Auto merge of #1676 - micbou:fix-it-chunks-sorting, r=Valloric 2015-09-13 13:48:54 +09:00
tests Add chunks sorting tests 2015-09-12 18:14:05 +02:00
__init__.py Fixing python tests broken in rename 2013-05-19 20:06:14 -07:00
base.py Deleting obsolete code 2015-07-02 08:38:27 -07:00
diagnostic_interface.py YouCompleteMe client support for FixIt subcommands 2015-08-05 22:09:07 +01:00
omni_completer.py Refactored completion request creation 2014-05-27 17:38:34 -07:00
syntax_parse.py Now extracting PHP functions. 2014-09-02 10:53:38 -07:00
test_utils.py Changing copyright headers from me to Google 2014-01-13 11:08:43 -08:00
unsafe_thread_pool_executor.py Changing copyright headers from me to Google 2014-01-13 11:08:43 -08:00
vimsupport.py Correct FixIt chunks sorting 2015-09-12 18:14:06 +02:00
youcompleteme.py Pass cwd to completer for filename completions 2015-08-26 23:41:40 +01:00