about summary refs log tree commit diff stats
path: root/src/local/client.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-02-11 00:40:51 +0100
committerbptato <nincsnevem662@gmail.com>2024-02-11 00:40:51 +0100
commitb0583b4760a11bd062781e0ea948c61c8b66ff8f (patch)
tree5bfb46cb1aa57d62fb40d6b6869ac8a875071561 /src/local/client.nim
parentd0690cfea6a87c7b7d801b968b5a1c85d1e99b4f (diff)
downloadchawan-b0583b4760a11bd062781e0ea948c61c8b66ff8f.tar.gz
Get rid of LOAD_PIPE BufferSource
Instead, use a stream: scheme and associate hostnames with file
descriptors directly from the pager.
Diffstat (limited to 'src/local/client.nim')
-rw-r--r--src/local/client.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/local/client.nim b/src/local/client.nim
index ae838360..76cbd4e7 100644
--- a/src/local/client.nim
+++ b/src/local/client.nim
@@ -516,7 +516,7 @@ proc addConsole(pager: Pager, interactive: bool, clearFun, showFun, hideFun:
     var pipefd: array[0..1, cint]
     if pipe(pipefd) == -1:
       raise newException(Defect, "Failed to open console pipe.")
-    let url = newURL("javascript:console.show()").get
+    let url = newURL("stream:console").get
     let container = pager.readPipe0(some("text/plain"), CHARSET_UNKNOWN,
       pipefd[0], some(url), ConsoleTitle, canreinterpret = false)
     let err = newPosixStream(pipefd[1])
@@ -543,7 +543,7 @@ proc clearConsole(client: Client) =
   var pipefd: array[0..1, cint]
   if pipe(pipefd) == -1:
     raise newException(Defect, "Failed to open console pipe.")
-  let url = newURL("javascript:console.show()").get
+  let url = newURL("stream:console").get
   let pager = client.pager
   let replacement = pager.readPipe0(some("text/plain"), CHARSET_UNKNOWN,
     pipefd[0], some(url), ConsoleTitle, canreinterpret = false)
@@ -613,7 +613,7 @@ proc launchClient*(client: Client, pages: seq[string],
       module = ismodule)
 
   if not stdin.isatty():
-    client.pager.readPipe(contentType, cs, stdin.getFileHandle())
+    client.pager.readPipe(contentType, cs, stdin.getFileHandle(), "*stdin*")
 
   for page in pages:
     client.pager.loadURL(page, ctype = contentType, cs = cs)