-
Notifications
You must be signed in to change notification settings - Fork 25
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
emoji characters cause issues such as offset to search highlighting as well as hyperlink anomalies #45
Comments
Sounds like a bug to me, thanks for reporting. |
So apparently this is |
Closes #45. Signed-off-by: Alex Tereschenko <frozen.and.blue@gmail.com>
Closes #45. Signed-off-by: Alex Tereschenko <frozen.and.blue@gmail.com>
Closes #45. Signed-off-by: Alex Tereschenko <frozen.and.blue@gmail.com>
Closes #45. Signed-off-by: Alex Tereschenko <frozen.and.blue@gmail.com>
So at the end of the day it turned out a slightly different problem and actually even two (with the same root cause). Both search highlighting and URL activation were using .NET's string indexes, which apparently are not covering all Unicode symbols as symbols and fall back to bytes for things like these emojis. I've fixed both places to use a different approach to determining the area to highlight/activate and it passed my simple tests, so I've got this in. Feel free to test it out and let me know if you'd want an engineering build for Windows to give it a try. |
thanks! :-) |
(for what it's worth, testing shows this issue does not affect gnote ...)
emoji characters (e.g. 😁) inserted into a tomboy note cause search highlighting to be offset for matches appearing somewhere after the emoji character. for example, say you have a note with the following content:
if you search for "test", the string "test" will be highlighted in the first line, whereas the string "est2" will be highlighted in the third line.
emoji characters also cause anomalies in hyperlinking. after inserting e.g. "😁" into a note, if you type "http://google.com" somewhere after the emoji, once you type "http://", the text will appear as a hyperlink, but once you type "g" the leading "h" will no longer appear as part of the hyperlink; once you type "o", the leading "h" will again appear as part of the hyperlink (this alternation continues as you continue to type).
Note that I originally assumed that all multibyte characters cause this issue, but that doesn't seem to be the case, as the ellipsis character (…), as an example, doesn't cause the same issue.
The text was updated successfully, but these errors were encountered: