Closed xlucn closed 2 years ago
Your request makes sense. Surely, there is no way to disable URI opening but work as normal text , so I fixed the specification.
Please check the diff 4162a328556449a417864a5181c1732e169e44de.
That works, thanks! I will close this issue then.
P.S. The hook now should be a little different:
tym.set_hooks({
['clicked'] = function(button, uri)
if button == 1 and uri then
if tym.check_mod_state('<Ctrl>') then
tym.open(uri)
return true
end
end
end,
})
This is my exact problem: I want to use
ctrl+button1
to open uris, otherwise treat uris as normal text, for example I can select them with cursor. Something like this from termite.I tried something like this (and others):
But I can't achieve all these at the same time:
ctrl
+button1
The issue is, if the function doesn't return
true
on single click, the default hook will be triggered and open the uri, but otherwise (returntrue
) clicking does absolutely nothing on url including selecting the text.