about summary refs log tree commit diff stats
path: root/src/display
diff options
context:
space:
mode:
Diffstat (limited to 'src/display')
-rw-r--r--src/display/pager.nim6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/display/pager.nim b/src/display/pager.nim
index 9837d2fa..9c3e664b 100644
--- a/src/display/pager.nim
+++ b/src/display/pager.nim
@@ -532,7 +532,11 @@ proc gotoURL*(pager: Pager, request: Request, prevurl = none(URL),
 proc omniRewrite(pager: Pager, s: string): string =
   for rule in pager.omnirules:
     if rule.match.match(s):
-      return rule.subst(s).get
+      let sub = rule.subst(s)
+      if sub.isSome:
+        return sub.get
+      else:
+        pager.alert("Error in substitution of rule " & rule.match.buf & " for " & s)
   return s
 
 # When the user has passed a partial URL as an argument, they might've meant