From: Jean-Marc Lasgouttes Date: Mon, 9 Aug 2010 20:37:31 +0000 (+0000) Subject: fix bug #6786: InsetLayout name containing spaces is incompatible with keybindings... X-Git-Tag: 2.0.0~2825 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=920798c4d67a8d053704ac2315b15ad79d71b187;p=features.git fix bug #6786: InsetLayout name containing spaces is incompatible with keybindings/toolbars git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35109 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/KeyMap.cpp b/src/KeyMap.cpp index 8c28b50031..61e4562cf0 100644 --- a/src/KeyMap.cpp +++ b/src/KeyMap.cpp @@ -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();