From 32abf37be768dd8dc831c5226bb974420c24ffd5 Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 26 Jul 2023 00:00:54 +0200 Subject: Add suspend() function (bound to C-z) --- src/display/client.nim | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/display/client.nim') diff --git a/src/display/client.nim b/src/display/client.nim index a292bf0a..5b961841 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -154,6 +154,11 @@ proc command(client: Client, src: string) = client.console.container.requestLines().then(proc() = client.console.container.cursorLastLine()) +proc suspend(client: Client) {.jsfunc.} = + client.pager.term.quit() + discard kill(getpid(), cint(SIGSTOP)) + client.pager.term.restart() + proc quit(client: Client, code = 0) {.jsfunc.} = if client.alive: client.alive = false -- cgit 1.4.1-2-gfad0