}
-bool KeyMap::read(string const & bind_file, KeyMap * unbind_map, BindReadType rt)
+bool KeyMap::read(string const & bind_file, KeyMap * unbind_map, BindReadType rt, bool i18n)
{
- FileName bf = i18nLibFileSearch("bind", bind_file, "bind");
+ FileName bf = i18n ? i18nLibFileSearch("bind", bind_file, "bind")
+ : libFileSearch("bind", bind_file, "bind");
if (bf.empty()) {
if (rt == MissingOK)
return true;
error = true;
break;
}
- string const tmp = lexrc.getString();
- error |= !read(tmp, unbind_map);
+ string tmp = lexrc.getString();
+ if (prefixIs(tmp, "../")) {
+ tmp = split(tmp, '/');
+ // look in top dir
+ error |= !read(tmp, unbind_map, Default, false);
+ } else
+ // i18n search
+ error |= !read(tmp, unbind_map);
break;
}
if (cit->prefixes) {
// this is a prefix key - set new map
seq->curmap = cit->prefixes.get();
- static const FuncRequest prefix(LFUN_COMMAND_PREFIX);
- return prefix;
+ return FuncRequest::prefix;
} else {
// final key - reset map
seq->reset();