about summary refs log tree commit diff stats
path: root/src/config
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-05-12 19:02:02 +0200
committerbptato <nincsnevem662@gmail.com>2024-05-12 19:02:02 +0200
commit87967537bcf0d785d582a7fc4bd9d080eb9da69a (patch)
tree8d61f0ffca6afeac069287f7741a220d41fb9793 /src/config
parent53079a080291889428071700f8c0919f84132534 (diff)
downloadchawan-87967537bcf0d785d582a7fc4bd9d080eb9da69a.tar.gz
pager: editor command fixes
Diffstat (limited to 'src/config')
-rw-r--r--src/config/chapath.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/config/chapath.nim b/src/config/chapath.nim
index c02a3f1e..d9ba3c50 100644
--- a/src/config/chapath.nim
+++ b/src/config/chapath.nim
@@ -145,7 +145,7 @@ proc stateCurly(ctx: var UnquoteContext; c: char): ChaPathResult[void] =
     ctx.identStr &= c
     return ok()
   of ':', '-', '?', '+': # note: we don't support `=' (assign)
-    if ctx.identStr.len > 0:
+    if ctx.identStr.len == 0:
       return err("substitution without parameter name")
     if c == ':':
       ctx.state = usCurlyColon
@@ -235,6 +235,7 @@ proc flushCurlyExpand(ctx: var UnquoteContext; word: string):
   else: assert false
   ctx.subChar = '\0'
   ctx.hasColon = false
+  ctx.state = usNormal
   return ok()
 
 proc stateCurlyExpand(ctx: var UnquoteContext; c: char): ChaPathResult[void] =