diff options
author | bptato <nincsnevem662@gmail.com> | 2023-01-02 21:40:14 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-01-02 21:40:14 +0100 |
commit | a13955ef170b64f27fc83e67b30b83bb56624a19 (patch) | |
tree | fd0bd72cc99b480c07e3289b103dd89b6c910fa6 /src/buffer | |
parent | 62983cdc609aacc47ade0a8a4a4c6b85dd26199a (diff) | |
download | chawan-a13955ef170b64f27fc83e67b30b83bb56624a19.tar.gz |
container, pager: work around bad codegen
Diffstat (limited to 'src/buffer')
-rw-r--r-- | src/buffer/container.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim index 570dbce8..61097186 100644 --- a/src/buffer/container.nim +++ b/src/buffer/container.nim @@ -724,11 +724,11 @@ proc reshape(container: Container): EmptyPromise {.discardable, jsfunc.} = container.setNumLines(lines) return container.requestLines()) -proc dupeBuffer*(dispatcher: Dispatcher, container: Container, config: Config, location = none(URL), contenttype = none(string)): Container = +proc dupeBuffer*(dispatcher: Dispatcher, container: Container, config: Config, location: URL, contenttype: string): Container = let source = BufferSource( t: CLONE, - location: location.get(container.source.location), - contenttype: if contenttype.isSome: contenttype else: container.contenttype, + location: if location != nil: location else: container.source.location, + contenttype: if contenttype != "": some(contenttype) else: container.contenttype, clonepid: container.process, ) container.pipeto = dispatcher.newBuffer(container.config, source, container.title) |