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

Fix BytePos -> CharPos calculations #6574

Merged
merged 4 commits into from Dec 4, 2022
Merged

Commits on Dec 3, 2022

  1. Fix UTF-8 -> UTF-16 calculation

    There were a few issues in the old code:
    
    1. UTF-8 maps 1-3 bytes into 1 UTF-16 char, but 4 bytes into 2 UTF-16 chars
    2. The starting offset was not recorded when we end the `multibyte_chars` iteration
    3. The `mappings` can be unordered, meaning we need to restart UTF-16 offset calculation
    jridgewell committed Dec 3, 2022
    Configuration menu
    Copy the full SHA
    ef0c185 View commit details
    Browse the repository at this point in the history

Commits on Dec 4, 2022

  1. Configuration menu
    Copy the full SHA
    8ff6494 View commit details
    Browse the repository at this point in the history
  2. Remove debug statement

    jridgewell committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    10bc02c View commit details
    Browse the repository at this point in the history
  3. Fixes

    jridgewell committed Dec 4, 2022
    Configuration menu
    Copy the full SHA
    8944cd3 View commit details
    Browse the repository at this point in the history