about summary refs log tree commit diff stats
path: root/src/extern
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-12-01 21:24:34 +0100
committerbptato <nincsnevem662@gmail.com>2023-12-10 15:08:38 +0100
commite5a0fd6af4296f76987530a9566eb019307fa8bf (patch)
tree7002cc8d9772cd2bc4e78d7785a524eae791f5aa /src/extern
parent3cadec11d0d8758c1a396ce77a61d5adab5bc6c1 (diff)
downloadchawan-e5a0fd6af4296f76987530a9566eb019307fa8bf.tar.gz
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.
Diffstat (limited to 'src/extern')
-rw-r--r--src/extern/editor.nim4
1 files changed, 2 insertions, 2 deletions
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)