clemos / haxe-sublime-bundle

Sublime Text bundle for Haxe programming language
Apache License 2.0
235 stars 86 forks source link

Invalid auto-completion position passed if code contains non-latin characters. #140

Closed nadako closed 10 years ago

nadako commented 10 years ago

Sublime plugin calculates display offset in characters instead of bytes, so if code contains a character that is represented in more than one byte (i.e. UTF-8), it passes wrong position to haxe compiler and it doesn't work because of parse error.

Example:

class Main {
    static function main() {
        "a";haxe.|
    }
}

Change that a to anything non-latin that is represented more than one byte in UTF-8 (for example: cyrillic ы) and you get completion failing.