diff options
| author | bptato <nincsnevem662@gmail.com> | 2022-10-24 09:37:57 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2022-10-24 09:37:57 +0200 |
| commit | e30b40fc2cd80cd3b66622db8f505dfc9c1db8e9 (patch) | |
| tree | 41e3bf684d9f22d88595f34c44c92ec04a8ff88b /src | |
| parent | 639e56e3377629380d0777a533d1ebd7afd5645a (diff) | |
| download | chawan-e30b40fc2cd80cd3b66622db8f505dfc9c1db8e9.tar.gz | |
Fix piped streams
Diffstat (limited to 'src')
| -rw-r--r-- | src/display/client.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/display/client.nim b/src/display/client.nim index 54883a53..c51a4e5b 100644 --- a/src/display/client.nim +++ b/src/display/client.nim @@ -69,7 +69,9 @@ proc readPipe(client: Client, ctype: string) = let buffer = newBuffer(client.config, client.loader) buffer.contenttype = if ctype != "": ctype else: "text/plain" buffer.ispipe = true - buffer.istream = newFileStream(stdin) + let ifs = newFileStream(stdin) + buffer.istream = newStringStream(ifs.readAll()) + ifs.close() buffer.location = newURL("file://-") client.pager.addBuffer(buffer) #TODO is this portable at all? |