-
Notifications
You must be signed in to change notification settings - Fork 17
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
Incorrect selection is picked #17
Comments
Can you give me an example file where this happens and which symbol in which row/column you are trying to select? |
Thanks. The problem seems to be Windows/DOS line endings (\r\n) vs. Unix line endings (\n), which results in the calculation of the wrong byte offsets. When I converted a source file to Windows line endings I was able to reproduce the bug on a Mac. The problem itself is browser independent. |
The browser loses the \r characters as soon as the source code is inserted via the .html() method: var text = '1\r\n2\r\n3\r\n4\r\n5\r\n'; $('#src').html(text); |
I am using chrome, often click is needed in a row below the actual symbol to be selected.
I have also seen instances where the click is 2 to 3 rows below the actual code section select for highlighting !
The text was updated successfully, but these errors were encountered: