diff options
author | bptato <nincsnevem662@gmail.com> | 2022-11-27 00:30:53 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2022-11-27 00:31:56 +0100 |
commit | e7f157c792f53cb084e8694ee608f00727432a3d (patch) | |
tree | f4b640619327b5e15578cc156028102955437e36 /src/display/client.nim | |
parent | a58d2eff7f68bf98ee3b1ba1b59de6d80743f97e (diff) | |
download | chawan-e7f157c792f53cb084e8694ee608f00727432a3d.tar.gz |
Also, implement proper async
Well, not really proper, but better than nothing? Maybe not.
Diffstat (limited to 'src/display/client.nim')
-rw-r--r-- | src/display/client.nim | 6 |
1 files changed, 3 insertions, 3 deletions
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.") |