Add new option detect_urls to check for URLs under the mouse cursor

Enabled by default add new option `detect_urls` that will allow you
contorl if kitty should detect URLs under the mouse cursor.  If disabled
the URLs are still clickable with open_url_modifiers.
This commit is contained in:
Derek Schrock
2020-11-22 00:58:26 -05:00
parent c46ebebbb3
commit cb164e5cac
4 changed files with 8 additions and 1 deletions

View File

@@ -520,6 +520,9 @@ def url_prefixes(x: str) -> Tuple[str, ...]:
o('url_prefixes', 'http https file ftp', option_type=url_prefixes, long_text=_('''
The set of URL prefixes to look for when detecting a URL under the mouse cursor.'''))
o('detect_urls', True, long_text=_('''
Detect URL under the mouse cursor. If disabled URLs are still clickable.'''))
def copy_on_select(raw: str) -> str:
q = raw.lower()