GNOME Bugzilla – Bug 757541
Show Unicode codepoint in right-click menu
Last modified: 2017-10-22 17:20:24 UTC
Let's see if this is useful.
Created attachment 314766 [details] [review] Show character info in right-click menu, PoC Strictly proof of concept. Doesn't work on the right half of CJK, or with combining characters. With the latter the goal would be to list all the codepoints. This requires to reimplement using vte_terminal_get_text_range() (or a similar method) rather than the regex engine. The patch goes on top of bug 757540's patch, just to avoid conflicts and be able to test both at the same time.
We should add a public method to get from event coords to absolute grid coords, which you can then use with get_text_range to get the full string, I think. Also, if we're going to start adding more of these entries in the context menu, we should add a way to en/dis-able them individually?
I'm not sure what's the direction we'd like to take here. If it wasn't Gnome but more of a hackers' terminal, I'd go for some plugin system. For now, I guess I'm fine with what we already have, and have these two patches just sit here in the bugtracker for a couple of years as nice proof of concepts :)
In the last month or so, g-t crashed for me twice when I right-clicked on an empty area. I suspect this patch.
Same as in bug 758501 for testvte: matches = g_newa (char *, n_extra_regexes); Need to use set the members to NULL before calling vte_terminal_event_check_regex_simple().
Comment on attachment 314766 [details] [review] Show character info in right-click menu, PoC Needs to be updated for gmenu, if you still think we should have this. Or close this bug.
This patch was imperfect, caused a crash. Plus, I haven't received any feedback about the numbers in the right click menu. So probably no one would care about this.