From 7087b7b686d449e37690f43b4e19e881c3305cfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Spitzm=C3=BCller?= Date: Mon, 17 Aug 2009 08:01:35 +0000 Subject: [PATCH] * BufferParams.cpp: fix initialization of index colors. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@31084 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferParams.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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") { -- 2.39.5