From e5a0fd6af4296f76987530a9566eb019307fa8bf Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 1 Dec 2023 21:24:34 +0100 Subject: config: better path handling; fix array parsing bug * Paths are now parsed through an unified code path with some useful additions like environment variable substitution. * Fix a bug in parseConfigValue where strings would be appended to existing arrays (and not override them). * Fix beforeLast calling afterLast for some reason. * Add a default CGI directory. --- src/extern/editor.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/extern') diff --git a/src/extern/editor.nim b/src/extern/editor.nim index 345b1d67..9fb0fd89 100644 --- a/src/extern/editor.nim +++ b/src/extern/editor.nim @@ -40,9 +40,9 @@ proc openEditor*(term: Terminal, config: Config, file: string, line = 1): bool = let cmd = formatEditorName(editor, file, line) return runProcess(term, cmd) -proc openInEditor*(term: Terminal, config: Config, input: var string): bool = +proc openInEditor*(term: Terminal, config: Config, tmpdir: string, + input: var string): bool = try: - let tmpdir = config.external.tmpdir let tmpf = getTempFile(tmpdir) if input != "": writeFile(tmpf, input) -- cgit 1.4.1-2-gfad0