summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p@janouch.name>2018-10-26 07:51:44 +0200
committerPřemysl Janouch <p@janouch.name>2018-10-26 07:51:44 +0200
commitffa5754b591db293db0ddb87ad8b8d4c5c88320e (patch)
treeb3fa399d6e05f8007a7350ad69eb4bb0c65725d1
parent6f66aa3c06d3ed29cdc0d5e680840e4125fccb04 (diff)
downloadsdn-ffa5754b591db293db0ddb87ad8b8d4c5c88320e.tar.gz
sdn-ffa5754b591db293db0ddb87ad8b8d4c5c88320e.tar.xz
sdn-ffa5754b591db293db0ddb87ad8b8d4c5c88320e.zip
Cleanup
-rw-r--r--sdn.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/sdn.cpp b/sdn.cpp
index 416ef7e..aece1fc 100644
--- a/sdn.cpp
+++ b/sdn.cpp
@@ -895,7 +895,6 @@ fun parse_key (const string &key_name) -> wint_t {
c |= ALT;
p += 2;
}
-
if (!strncmp (p, "C-", 2)) {
p += 2;
if (*p < 32) {
@@ -905,8 +904,7 @@ fun parse_key (const string &key_name) -> wint_t {
c |= CTRL *p;
p += 1;
} else if (g.key_names.count (p)) {
- c |= g.key_names.at (p);
- p += strlen (p);
+ return c | g.key_names.at (p);
} else {
wchar_t w; mbstate_t mb {};
auto len = strlen (p) + 1, res = mbrtowc (&w, p, len, &mb);