From: Jürgen Spitzmüller Date: Mon, 17 Aug 2009 08:01:35 +0000 (+0000) Subject: * BufferParams.cpp: fix initialization of index colors. X-Git-Tag: 2.0.0~5692 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=7087b7b686d449e37690f43b4e19e881c3305cfe;p=lyx.git * BufferParams.cpp: fix initialization of index colors. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31084 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/BufferParams.cpp b/src/BufferParams.cpp index 66dadbee58..c420ef3ba0 100644 --- a/src/BufferParams.cpp +++ b/src/BufferParams.cpp @@ -660,6 +660,7 @@ string BufferParams::readToken(Lexer & lex, string const & token, } else if (token == "\\index") { lex.eatLine(); docstring index = lex.getDocString(); + docstring shortcut; indiceslist().add(index); while (true) { lex.next(); @@ -669,8 +670,9 @@ string BufferParams::readToken(Lexer & lex, string const & token, Index * index_ptr = indiceslist().find(index); if (tok == "\\shortcut") { lex.next(); + shortcut = lex.getDocString(); if (index_ptr) - index_ptr->setShortcut(lex.getDocString()); + index_ptr->setShortcut(shortcut); } // not yet operational if (tok == "\\color") { @@ -682,7 +684,8 @@ string BufferParams::readToken(Lexer & lex, string const & token, if (color == "none") color = lcolor.getX11Name(Color_background); // FIXME UNICODE - lcolor.setColor(to_utf8(index), color); + if (!shortcut.empty()) + lcolor.setColor(to_utf8(shortcut), color); } } } else if (token == "\\author") {