about summary refs log tree commit diff stats
path: root/src/buffer
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-13 02:03:47 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-13 02:03:47 +0100
commit89750ef4ad621fe7fdce533d1265f3d970098a19 (patch)
tree0aa80ceb07ce0ad49e5c3ba369f96bb67c1b6dd5 /src/buffer
parentd9e430c8147c8c2d81b4ca5405786269b2cfc94d (diff)
downloadchawan-89750ef4ad621fe7fdce533d1265f3d970098a19.tar.gz
Update config and config docs
Diffstat (limited to 'src/buffer')
-rw-r--r--src/buffer/container.nim7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim
index a148e0e1..a08f4cb0 100644
--- a/src/buffer/container.nim
+++ b/src/buffer/container.nim
@@ -97,8 +97,11 @@ type
     events*: Deque[ContainerEvent]
     startpos: Option[CursorPosition]
     hasstart: bool
+    redirectdepth*: int
 
-proc newBuffer*(dispatcher: Dispatcher, config: Config, source: BufferSource, cookiejar: CookieJar, title = ""): Container =
+proc newBuffer*(dispatcher: Dispatcher, config: Config, source: BufferSource,
+                cookiejar: CookieJar, title = "",
+                redirectdepth = 0): Container =
   let attrs = getWindowAttributes(stdout)
   let config = config.getBufferConfig(source.location, cookiejar)
   let ostream = dispatcher.forkserver.ostream
@@ -112,7 +115,7 @@ proc newBuffer*(dispatcher: Dispatcher, config: Config, source: BufferSource, co
   result = Container(
     source: source, attrs: attrs, width: attrs.width,
     height: attrs.height - 1, contenttype: source.contenttype,
-    title: title, config: config
+    title: title, config: config, redirectdepth: redirectdepth
   )
   istream.sread(result.process)
   result.pos.setx = -1