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

Ace Editor Bug: Markers on long lines "drift" to the right #16

Open
jvilk opened this issue Feb 15, 2018 · 0 comments
Open

Ace Editor Bug: Markers on long lines "drift" to the right #16

jvilk opened this issue Feb 15, 2018 · 0 comments
Labels

Comments

@jvilk
Copy link
Member

jvilk commented Feb 15, 2018

BLeak's viewer uses the Ace Editor to display source code, and uses Ace Editor's markers to highlight source locations that contribute to memory leaks. These markers drift to the right on long lines, causing the highlight to fall on incorrect characters.

I have triple checked the markers that BLeak is issuing to the Ace Editor, as well as the offset in the line, and have verified that this is an issue in the Ace Editor. The source lines contain no funky unicode characters, so number of characters making up the offset is equal to the byte length of the line expressed as UTF8.

The Ace Editor calculates the pixel location of a marker by multiplying the width of a monospace font character with the offset. It seems like there is some error accumulating over each character, causing the markers to drift on long offsets.

@jvilk jvilk added the bug label Feb 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant