diff options
author | bptato <nincsnevem662@gmail.com> | 2024-12-09 21:08:13 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-12-09 21:19:42 +0100 |
commit | cb0c54a71ddfd6ba6f53fd8e8fb716e32f68290b (patch) | |
tree | 111ecc870c4038ec8d1f18e7714f30fb71b694b3 /src/main.nim | |
parent | 14e0eaa2a431f7e42cdb27d655c37b13ce4b7de3 (diff) | |
download | chawan-cb0c54a71ddfd6ba6f53fd8e8fb716e32f68290b.tar.gz |
client: mostly merge into pager
not completely, because that would break the existing API :/ this also fixes the broken interruptHandler - it no longer crashes, but it's still inefficient... probably it should "just" handle SIGINT instead
Diffstat (limited to 'src/main.nim')
-rw-r--r-- | src/main.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.nim b/src/main.nim index fc78a78b..1a9a583e 100644 --- a/src/main.nim +++ b/src/main.nim @@ -9,6 +9,7 @@ import config/chapath import config/config import io/dynstream import local/client +import local/pager import local/term import monoucha/javascript import server/forkserver @@ -264,10 +265,11 @@ proc main() = discard mkdir(cstring(config.external.tmpdir), 0o700) discard mkdir(cstring(config.external.sockdir), 0o700) let loaderPid = forkserver.loadConfig(config) + setControlCHook(proc() {.noconv.} = quit(1)) let client = newClient(config, forkserver, loaderPid, jsctx, warnings, urandom) try: - client.launchClient(ctx.pages, ctx.contentType, ctx.charset, ctx.dump) + client.pager.run(ctx.pages, ctx.contentType, ctx.charset, ctx.dump) except CatchableError: client.flushConsole() raise |