YouCompleteMe/python/ycm
zzbot 44d4f1d299 Auto merge of #2690 - micbou:identifier-functions-codepoint, r=Valloric
[READY] Use codepoint offsets in identifier functions

`CurrentIdentifierFinished` and `LastEnteredCharIsIdentifierChar` incorrectly use byte offsets with unicode lines (`CurrentColumn` returns a byte offset and `CurrentLineContents` a unicode string). This leads to weird bugs when there is a non-ASCII character on the current line:

![unicode-identifier-bug](https://user-images.githubusercontent.com/10026824/27256590-34b27c8c-53ba-11e7-8032-b98f0c7e0b14.gif)

This is fixed by converting byte offsets to codepoint ones through the `ByteOffsetToCodepointOffset` function.

This changes the behavior of these two functions when the current column position is invalid. Both functions returned false in that case. They now return as if the current column were at the end of the line. In practice, this doesn't really matter since the position of the current column should always be valid.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/valloric/youcompleteme/2690)
<!-- Reviewable:end -->
2017-06-18 12:29:13 -07:00
..
client Merge branch 'master' into fork_master 2017-03-30 20:26:11 +03:00
tests Auto merge of #2690 - micbou:identifier-functions-codepoint, r=Valloric 2017-06-18 12:29:13 -07:00
__init__.py Fixing python tests broken in rename 2013-05-19 20:06:14 -07:00
base.py Use codepoint offsets in identifier functions 2017-06-18 20:41:30 +02:00
buffer.py Refactored diag interface, removed dummy sign. 2017-06-05 22:20:57 +04:00
diagnostic_filter.py Do not install aliases from future 2017-03-18 18:24:48 +01:00
diagnostic_interface.py Removed current buffer caching approach. 2017-06-12 15:23:14 +04:00
omni_completer.py Do not install aliases from future 2017-03-18 18:24:48 +01:00
paths.py Do not cache Python interpreter path 2017-04-02 22:28:59 +02:00
setup.py Add error messages when ycmd crashed 2016-05-02 23:08:32 +02:00
syntax_parse.py Do not install aliases from future 2017-03-18 18:24:48 +01:00
unsafe_thread_pool_executor.py Update flake8 config 2016-03-06 17:39:55 +00:00
vimsupport.py Auto merge of #2690 - micbou:identifier-functions-codepoint, r=Valloric 2017-06-18 12:29:13 -07:00
youcompleteme.py Removed current buffer caching approach. 2017-06-12 15:23:14 +04:00