-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
[Testing] HyperTextView #281
Conversation
If this helps track down the tooltip bug, on my system there seems to be an issue with position offset, but only with the hover detector. It starts recognizing text halfway down the line, and continues recognizing the link halfway down the next line. This means that if I position the cursor over what seems like the middle of the text, odds are that it won't see the link. The ctrl+click operation works fine, presumably because you get the iterator a different way. This does seem to be unique to Tasks, as you said. There may be some way that we're creating a position offset that this function isn't aware of or treating properly. I'm rather stumped, and debugging TextView positions is not easy... Update: I've found a potential fix, or at least a place where this comes into play. It seems like var over_text = get_iter_at_location (out text_iter, x, y);
if (over_text) {
var tags = text_iter.get_tags ();
foreach (var tag in tags) {
if (tag.get_data<string?> ("uri") != null) {
uri = tag.get_data<string> ("uri");
break;
}
}
} else {
warning ("text_iter setting failed.");
if (text_iter != null) {
debug (@"Non-null text_iter. Char: $(text_iter.get_char ())");
debug ("chars_in_line: %i", text_iter.get_chars_in_line ());
}
} With this, I get characters printed by the |
I have pushed a commit that seems to fix the tooltip problem. |
@jeremypw thank you very much! Tested your fix and it works smoothly - it is now also part of the official HyperTextView PR over at the granite repo 🥳 elementary/granite#507 |
Supserseded by #314 |
Added the current implementation of HyperTextView for testing purposes. See elementary/granite#507 for details.