From 38c30549d3eda30a637af389694a0ecbc89973d5 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 16 Mar 2024 00:11:00 +0100 Subject: config: add start.console-buffer option useful for debugging --- src/local/client.nim | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/local/client.nim') diff --git a/src/local/client.nim b/src/local/client.nim index 2c5963aa..87defeb4 100644 --- a/src/local/client.nim +++ b/src/local/client.nim @@ -153,7 +153,8 @@ proc command0(client: Client, src: string, filename = "", proc command(client: Client, src: string) = client.command0(src) let container = client.consoleWrapper.container - container.tailOnLoad = true + if container != nil: + container.tailOnLoad = true proc suspend(client: Client) {.jsfunc.} = client.pager.term.quit() @@ -715,7 +716,7 @@ const ConsoleTitle = "Browser Console" proc addConsole(pager: Pager; interactive: bool; clearFun, showFun, hideFun: proc()): ConsoleWrapper = - if interactive: + if interactive and pager.config.start.console_buffer: var pipefd: array[0..1, cint] if pipe(pipefd) == -1: raise newException(Defect, "Failed to open console pipe.") -- cgit 1.4.1-2-gfad0