-
Notifications
You must be signed in to change notification settings - Fork 194
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed off-by-one error that was vexing code unit conversions.
The problem was that the character positions are _before_ the reported unit, so the 0th code unit is before the start of the line and the 1st code unit is the first character. The prior code added one to character counts to smooth this out, but you can't do that, because you could end up indexing into the middle of a multibyte character.
- Loading branch information
Showing
3 changed files
with
53 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters