diff options
author | bptato <nincsnevem662@gmail.com> | 2022-10-19 13:19:02 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-10-19 13:19:02 +0200 |
commit | 99d1e817c5db384cd586221f552ede2c256d613b (patch) | |
tree | 1dd35b9aa849abd808567dde90a0282e22e27c4f /src/display/client.nim | |
parent | e0c1d414a196a0b064ff74e8290092e5dbd496be (diff) | |
download | chawan-99d1e817c5db384cd586221f552ede2c256d613b.tar.gz |
Fix crash on opening unavailable resources
Diffstat (limited to 'src/display/client.nim')
-rw-r--r-- | src/display/client.nim | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/display/client.nim b/src/display/client.nim index 1f15e907..78f29f43 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -290,9 +290,13 @@ proc launchClient*(client: Client, pages: seq[string], ctype: string, dump: bool client.pager.loadURL(page, force = true, ctype = ctype) if stdout.isatty and not dump: - when defined(posix): - enableRawMode() - client.inputLoop() + if client.pager.container != nil: + when defined(posix): + enableRawMode() + client.inputLoop() + else: + for msg in client.pager.status: + eprint msg else: for msg in client.pager.status: eprint msg |