about summary refs log tree commit diff stats
path: root/config.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-01-23 14:20:41 +0100
committerbptato <nincsnevem662@gmail.com>2021-01-23 14:20:41 +0100
commited3886ab51a76f184d023d79e085f928427b8328 (patch)
tree1e95754cb83677fa278be4206f4876e3af835a84 /config.nim
parent94d681b3935a3f9105dc60320230fa9657cbd7b5 (diff)
downloadchawan-ed3886ab51a76f184d023d79e085f928427b8328.tar.gz
unicode kinda broken otherwise better than ever
Diffstat (limited to 'config.nim')
-rw-r--r--config.nim7
1 files changed, 4 insertions, 3 deletions
diff --git a/config.nim b/config.nim
index f13d172b..8df30caf 100644
--- a/config.nim
+++ b/config.nim
@@ -23,6 +23,7 @@ type
     ACTION_RELOAD, ACTION_RESHAPE, ACTION_REDRAW,
     ACTION_CURSOR_FIRST_LINE, ACTION_CURSOR_LAST_LINE,
     ACTION_CURSOR_TOP, ACTION_CURSOR_MIDDLE, ACTION_CURSOR_BOTTOM,
+    ACTION_CENTER_LINE, ACTION_LINE_INFO,
     ACTION_LINED_SUBMIT, ACTION_LINED_CANCEL,
     ACTION_LINED_BACKSPACE, ACTION_LINED_CLEAR, ACTION_LINED_KILL, ACTION_LINED_KILL_WORD,
     ACTION_LINED_BACK, ACTION_LINED_FORWARD,
@@ -84,10 +85,10 @@ proc constructActionTable*(origTable: var Table[string, TwtAction]): Table[strin
   return newTable
 
 macro staticReadKeymap(): untyped =
-  var keymap = staticRead"keymap"
+  var config = staticRead"config"
   var normalActionMap: Table[string, TwtAction]
   var linedActionMap: Table[string, TwtAction]
-  for line in keymap.split('\n'):
+  for line in config.split('\n'):
     if line.len == 0 or line[0] == '#':
       continue
     let cmd = line.split(' ')
@@ -126,7 +127,7 @@ macro staticReadKeymap(): untyped =
 
 staticReadKeymap()
 
-proc readKeymap*(filename: string): bool =
+proc readConfig*(filename: string): bool =
   var f: File
   let status = f.open(filename, fmRead)
   var normalActionMap: Table[string, TwtAction]