You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I ask gocode for autocomplete suggestions at position 65 (right after 'os.') it returns [2, [{"class": "package", "name": "os", "type": ""}]]
If I ask gocode for autocomplete suggestions at position 66 (the next line, right before the '}') it returns everything from the os package. If the 'π' is replaced by any ASCII character the autocomplete returns all of this at position 65 as expected.
The text was updated successfully, but these errors were encountered:
Gocode handles unicode correctly, believe me, I designed it that way. Probably GoSublime or whatever it is, misunderstands gocode's input expectations. It expects as a cursor position offset in bytes. And the file encoding must be utf-8 (as Go compiler expects for any Go source file). Therefore byte offset for multibyte characters != character offset. Works fine in vim:
So, the patch is here. Now gocode understands cursor position specified as a characters offset (need to prefix the number with 'c' or 'C'). I guess the issue will be resolved on the gosublime side as well (if not already). Closing it.. reopen if necessary.
I am using gocode via GoSublime, but I've tested this out by running gocode manually as well.
Consider the following program:
If I ask gocode for autocomplete suggestions at position 65 (right after 'os.') it returns
[2, [{"class": "package", "name": "os", "type": ""}]]
If I ask gocode for autocomplete suggestions at position 66 (the next line, right before the '}') it returns everything from the os package. If the 'π' is replaced by any ASCII character the autocomplete returns all of this at position 65 as expected.
The text was updated successfully, but these errors were encountered: