]> git.lyx.org Git - lyx.git/blobdiff - src/KeyMap.cpp
THINSPACE is nonbreakable (i.e., 0x202f, not 0x2009)
[lyx.git] / src / KeyMap.cpp
index b4a87d227c911881544b4b59db6e52cc072c7940..c530f5f1f2e93640960669da67f37265dffff1c9 100644 (file)
@@ -218,9 +218,10 @@ void KeyMap::clear()
 }
 
 
-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;
@@ -383,8 +384,14 @@ KeyMap::ReturnValues KeyMap::readWithoutConv(FileName const & bind_file, KeyMap
                                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;
                }
 
@@ -450,8 +457,7 @@ FuncRequest const & KeyMap::lookup(KeySymbol const &key,
                        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();