about summary refs log tree commit diff stats
path: root/config.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2021-02-06 20:09:53 +0100
committerbptato <nincsnevem662@gmail.com>2021-02-06 20:09:53 +0100
commit424f52e1f2eff84ee23a79b38e7932c2918351ed (patch)
tree839ae6b1be3934a2c6b4b0fcaac444082174bc6f /config.nim
parent5dfffae926009defec5cc3ab170c645967c68f33 (diff)
downloadchawan-424f52e1f2eff84ee23a79b38e7932c2918351ed.tar.gz
removing old readline
Diffstat (limited to 'config.nim')
-rw-r--r--config.nim13
1 files changed, 7 insertions, 6 deletions
diff --git a/config.nim b/config.nim
index abdd74db..0e7aa92b 100644
--- a/config.nim
+++ b/config.nim
@@ -13,6 +13,7 @@ type
     ACTION_CURSOR_UP, ACTION_CURSOR_DOWN, ACTION_CURSOR_LEFT, ACTION_CURSOR_RIGHT,
     ACTION_CURSOR_LINEEND, ACTION_CURSOR_LINEBEGIN,
     ACTION_CURSOR_NEXT_WORD, ACTION_CURSOR_PREV_WORD,
+    ACTION_CURSOR_NEXT_NODE, ACTION_CURSOR_PREV_NODE,
     ACTION_CURSOR_NEXT_LINK, ACTION_CURSOR_PREV_LINK,
     ACTION_PAGE_DOWN, ACTION_PAGE_UP,
     ACTION_HALF_PAGE_DOWN, ACTION_HALF_PAGE_UP,
@@ -93,9 +94,9 @@ macro staticReadKeymap(): untyped =
     let cmd = line.split(' ')
     if cmd.len == 3:
       if cmd[0] == "nmap":
-        normalActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction](cmd[2])
+        normalActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2])
       elif cmd[0] == "lemap":
-        linedActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction](cmd[2])
+        linedActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2])
 
   normalActionMap = constructActionTable(normalActionMap)
   linedActionMap = constructActionTable(linedActionMap)
@@ -139,9 +140,9 @@ proc readConfig*(filename: string): bool =
       let cmd = line.split(' ')
       if cmd.len == 3:
         if cmd[0] == "nmap":
-          normalActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction](cmd[2])
+          normalActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2])
         elif cmd[0] == "lemap":
-          linedActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction](cmd[2])
+          linedActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2])
 
     normalActionRemap = constructActionTable(normalActionMap)
     linedActionRemap = constructActionTable(linedActionMap)
@@ -158,9 +159,9 @@ proc parseKeymap*(keymap: string) =
     let cmd = line.split(' ')
     if cmd.len == 3:
       if cmd[0] == "nmap":
-        normalActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction](cmd[2])
+        normalActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2])
       elif cmd[0] == "lemap":
-        linedActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction](cmd[2])
+        linedActionMap[getRealKey(cmd[1])] = parseEnum[TwtAction]("ACTION_" & cmd[2])
 
   normalActionRemap = constructActionTable(normalActionMap)
   linedActionRemap = constructActionTable(linedActionMap)