Valloric/ycmd — pull request #10 by solawingg (2014-06-28 05:45:43+00:00)
Title: fix complete error when the line has multi-bytes utf-8 chars

Hi, Valloric, Nice to meet you.
YouCompleteMe is amazing, It's very useful.

but I found a small bug. when type after the multi-bytes utf-8 chars, the python will throw exception and no complete list popup.
I found this is because the python get the contents as unicode, but the index is according to bytes index, so index is out range
I already fix this. you can check the modified code.

In my mine branch, I also change the match algorithm. this is mainly because I can't bear LetterNode use so much memory, and slow down my computer. Also, I think the result compare should return immediately, since it will be call many times. and the result size should be as less as possible, since you sort them by value, not ref.
If you're interesting, you can fetch and check it.