summaryrefslogtreecommitdiff
path: root/sdn.cpp
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2020-10-08 13:31:54 +0200
committerPřemysl Eric Janouch <p@janouch.name>2020-10-08 14:28:49 +0200
commit000315165df66f23519fd3b503197c9818562d90 (patch)
tree48891e628fa51845e529bdd6dbe2707f9e821cc3 /sdn.cpp
parentd2e4b91262a2cd4de3ba59b37aca0c808cc7a051 (diff)
downloadsdn-000315165df66f23519fd3b503197c9818562d90.tar.gz
sdn-000315165df66f23519fd3b503197c9818562d90.tar.xz
sdn-000315165df66f23519fd3b503197c9818562d90.zip
Fix the help in absence of a bindings file
Diffstat (limited to 'sdn.cpp')
-rw-r--r--sdn.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sdn.cpp b/sdn.cpp
index 88ed181..83fbbd1 100644
--- a/sdn.cpp
+++ b/sdn.cpp
@@ -1551,10 +1551,6 @@ fun load_bindings () {
learn_named_key (filtered, SYM | kc);
}
- auto config = xdg_config_find ("bindings");
- if (!config)
- return;
-
// Stringization in the preprocessor is a bit limited, we want lisp-case
map<string, action> actions;
int a = 0;
@@ -1566,6 +1562,10 @@ fun load_bindings () {
actions[name] = action (a++);
}
+ auto config = xdg_config_find ("bindings");
+ if (!config)
+ return;
+
vector<string> tokens;
while (parse_line (*config, tokens)) {
if (tokens.empty ())