X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FKeyMap.cpp;h=61e4562cf09dc85a5702b596046a62e9d927a562;hb=77713af55868140483a1a7f5704dd93b97dbe116;hp=9592e0144aef25d1ee355798fbca42f7df980465;hpb=b79d8e5e2d20e8f294d47fe924c20de17dbd5c0b;p=lyx.git diff --git a/src/KeyMap.cpp b/src/KeyMap.cpp index 9592e0144a..61e4562cf0 100644 --- a/src/KeyMap.cpp +++ b/src/KeyMap.cpp @@ -262,11 +262,11 @@ bool KeyMap::read(FileName const & bind_file, KeyMap * unbind_map) lexrc.setFile(bind_file); if (!lexrc.isOK()) { - LYXERR0("KeyMap::read: cannot open bind file:" << bind_file.absFilename()); + LYXERR0("KeyMap::read: cannot open bind file:" << bind_file.absFileName()); return false; } - LYXERR(Debug::KBMAP, "Reading bind file:" << bind_file.absFilename()); + LYXERR(Debug::KBMAP, "Reading bind file:" << bind_file.absFileName()); bool error = false; while (lexrc.isOK()) { @@ -349,7 +349,7 @@ bool KeyMap::read(FileName const & bind_file, KeyMap * unbind_map) } if (error) - LYXERR0("KeyMap::read: error while reading bind file:" << bind_file.absFilename()); + LYXERR0("KeyMap::read: error while reading bind file:" << bind_file.absFileName()); return !error; } @@ -371,12 +371,12 @@ void KeyMap::write(string const & bind_file, bool append, bool unbind) const FuncCode action = it->request.action(); string arg = to_utf8(it->request.argument()); + string const cmd = lyxaction.getActionName(action) + + (arg.empty() ? string() : " " + arg) ; os << tag << " \"" - << to_utf8(it->sequence.print(KeySequence::BindFile)) - << "\" \"" - << lyxaction.getActionName(action) - << (arg.empty() ? "" : " ") << arg - << "\"\n"; + << to_utf8(it->sequence.print(KeySequence::BindFile)) + << "\" " << Lexer::quoteString(cmd) + << "\n"; } os << "\n"; os.close();