Fix display of url open failures not working

This commit is contained in:
Kovid Goyal 2022-06-02 10:41:08 +05:30
parent 12d8175d9a
commit dca8c65376
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -2286,8 +2286,8 @@ class Boss:
if failures: if failures:
from kittens.tui.operations import styled from kittens.tui.operations import styled
spec = '\n '.join(styled(u, fg='red') for u in failures) spec = '\n '.join(styled(u, fg='yellow') for u in failures)
bdata = f"Unknown URL type, cannot open:\n\n {spec}".encode('utf-8') bdata = json.dumps({'msg': f"Unknown URL type, cannot open:\n {spec}"}).encode('utf-8')
special_window = SpecialWindow([kitty_exe(), '+kitten', 'show_error', '--title', 'Open URL Error'], bdata, 'Open URL Error') special_window = SpecialWindow([kitty_exe(), '+kitten', 'show_error', '--title', 'Open URL Error'], bdata, 'Open URL Error')
if needs_window_replaced and tab is not None: if needs_window_replaced and tab is not None:
tab.new_special_window(special_window) tab.new_special_window(special_window)