-
Notifications
You must be signed in to change notification settings - Fork 5.3k
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
Autocomplete popup highlighting fails when string is over 32 chars long #2632
Labels
Comments
pthurlow
added a commit
to pthurlow/ace
that referenced
this issue
Aug 14, 2015
…an bit mask to avoid integer overflow issues. fixes ajaxorg#2632
+1 |
dmarcotte
pushed a commit
to looker/ace
that referenced
this issue
Jun 10, 2016
…an bit mask to avoid integer overflow issues. fixes ajaxorg#2632
dmarcotte
pushed a commit
to looker/ace
that referenced
this issue
Jun 10, 2016
…an bit mask to avoid integer overflow issues. fixes ajaxorg#2632
dmarcotte
pushed a commit
to looker/ace
that referenced
this issue
May 8, 2018
…an bit mask to avoid integer overflow issues. fixes ajaxorg#2632
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The highlighting implementation for ace autocomplete popup menu relies on a bit mask to determine the location of characters in the string to highlight. Since this bit mask is stored as an integer it can only store characters up to the maximum bits of an integer - 1, 31.
When shifting more than 31 characters the bitwise shift clips the first 31 bits off and converts the remaining bits as shown here:
This manifests itself in the autocomplete popover by causing text to get highlighted incorrectly. In this contrived example you can see the character at index 2 is incorrectly highlighted because the masked position of the A to be highlighted is 2 passed the 32nd character in the string.
The text was updated successfully, but these errors were encountered: