Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Count non-ASCII characters correctly for column numbers #63

Closed
4 tasks done
strager opened this issue Oct 9, 2020 · 1 comment
Closed
4 tasks done

Count non-ASCII characters correctly for column numbers #63

strager opened this issue Oct 9, 2020 · 1 comment
Assignees

Comments

@strager
Copy link
Collaborator

strager commented Oct 9, 2020

quick-lint-js gives incorrect column numbers when the source code contains non-ASCII characters:

/*☃*/x

Expected:

$ ./build/quick-lint-js hello.js
hello.js:1:6: error: use of undeclared variable: x

Observed:

$ ./build/quick-lint-js hello.js
hello.js:1:8: error: use of undeclared variable: x

quick-lint-js' locator should count ☃ as one column, not three.

  • CLI
  • WASM demo
  • LSP
  • Vim
@strager strager mentioned this issue Oct 9, 2020
7 tasks
@strager strager added this to the public release (v1.0) milestone Oct 29, 2020
@strager strager self-assigned this Dec 19, 2020
@strager
Copy link
Collaborator Author

strager commented Dec 25, 2020

  • CLI: Count bytes, like GCC and Clang do. Tested in commit 4c2383d. Newline handling untested.
  • WASM demo: Count UTF-16 code units. Implemented in commit bb83ba4.
  • LSP: Count UTF-16 code units. Implemented in commit ee99deb.
  • Vim: Count bytes. Tested in commit edcf38e. Newline handling poorly tested.

@strager strager closed this as completed Dec 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant