mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-28 11:11:47 +02:00
Fix #2970
This commit is contained in:
@@ -495,7 +495,7 @@ class Window:
|
|||||||
if hyperlink_id:
|
if hyperlink_id:
|
||||||
if not self.opts.allow_hyperlinks:
|
if not self.opts.allow_hyperlinks:
|
||||||
return
|
return
|
||||||
from urllib.parse import unquote, urlparse
|
from urllib.parse import unquote, urlparse, urlunparse
|
||||||
try:
|
try:
|
||||||
purl = urlparse(url)
|
purl = urlparse(url)
|
||||||
except Exception:
|
except Exception:
|
||||||
@@ -511,6 +511,7 @@ class Window:
|
|||||||
if remote_hostname and remote_hostname != hostname and remote_hostname != 'localhost':
|
if remote_hostname and remote_hostname != hostname and remote_hostname != 'localhost':
|
||||||
self.handle_remote_file(purl.netloc, unquote(purl.path))
|
self.handle_remote_file(purl.netloc, unquote(purl.path))
|
||||||
return
|
return
|
||||||
|
url = urlunparse(purl._replace(netloc=''))
|
||||||
if self.opts.allow_hyperlinks & 0b10:
|
if self.opts.allow_hyperlinks & 0b10:
|
||||||
from kittens.tui.operations import styled
|
from kittens.tui.operations import styled
|
||||||
get_boss()._run_kitten('ask', ['--type=choices', '--message', _(
|
get_boss()._run_kitten('ask', ['--type=choices', '--message', _(
|
||||||
|
|||||||
Reference in New Issue
Block a user