From e7f157c792f53cb084e8694ee608f00727432a3d Mon Sep 17 00:00:00 2001 From: bptato Date: Sun, 27 Nov 2022 00:30:53 +0100 Subject: Also, implement proper async Well, not really proper, but better than nothing? Maybe not. --- src/display/client.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/display/client.nim') diff --git a/src/display/client.nim b/src/display/client.nim index 36761d56..24ea8183 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -243,8 +243,7 @@ proc acceptBuffers(client: Client) = if pid in client.pager.procmap: let container = client.pager.procmap[pid] client.pager.procmap.del(pid) - container.istream = stream - container.ostream = stream + container.setStream(stream) let fd = stream.source.getFd() client.fdmap[int(fd)] = container client.selector.registerHandle(fd, {Read}, nil) @@ -314,7 +313,8 @@ proc writeFile(client: Client, path: string, content: string) {.jsfunc.} = proc newConsole(pager: Pager, tty: File): Console = new(result) - if tty != nil: + result.tty = tty + if tty != nil and false: var pipefd: array[0..1, cint] if pipe(pipefd) == -1: raise newException(Defect, "Failed to open console pipe.") -- cgit 1.4.1-2-gfad0