diff options
author | Marvin Borner | 2020-10-31 20:26:33 +0100 |
---|---|---|
committer | Marvin Borner | 2020-10-31 20:26:33 +0100 |
commit | 05901d834ec72ac753ba5d16057f907a5aa38fbc (patch) | |
tree | 24d7feccc237ba7eb1181941653173af7c0eba90 /libtxt/keymap.c | |
parent | 19af2060005aa93b74de3438224f52dd73cabdd3 (diff) |
Fixed space handling in keymap parser
Diffstat (limited to 'libtxt/keymap.c')
-rw-r--r-- | libtxt/keymap.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libtxt/keymap.c b/libtxt/keymap.c index 70af4fa..ae2ab02 100644 --- a/libtxt/keymap.c +++ b/libtxt/keymap.c @@ -54,6 +54,9 @@ struct keymap *keymap_parse(const char *path) } skip = 0; + if (ch == ' ' && !escaped) + ch = 0; + ch_index++; if (escaped) { switch (ch) { @@ -69,6 +72,9 @@ struct keymap *keymap_parse(const char *path) case '\\': ch = '\\'; break; + case ' ': + ch = ' '; + break; default: print("Unknown escape!\n"); } |