From 22d245312afb61f2267cf86714ab71f7926a1614 Mon Sep 17 00:00:00 2001 From: Tommaso Cucinotta Date: Thu, 30 Dec 2010 17:59:59 +0000 Subject: [PATCH] Addressing #6560. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37048 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/lyxfind.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lyxfind.cpp b/src/lyxfind.cpp index 1750e2f092..73b9df3718 100644 --- a/src/lyxfind.cpp +++ b/src/lyxfind.cpp @@ -1196,9 +1196,6 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M Buffer repl_buffer("", false); repl_buffer.setUnnamed(true); LASSERT(repl_buffer.readString(lyx), /**/); - repl_buffer.changeLanguage( - repl_buffer.language(), - cur.getFont().language()); if (opt.keep_case && sel_len >= 2) { if (cur.inTexted()) { if (firstUppercase(cur)) @@ -1209,6 +1206,9 @@ static void findAdvReplace(BufferView * bv, FindAndReplaceOptions const & opt, M } cap::cutSelection(cur, false, false); if (!cur.inMathed()) { + repl_buffer.changeLanguage( + repl_buffer.language(), + cur.getFont().language()); LYXERR(Debug::FIND, "Replacing by pasteParagraphList()ing repl_buffer"); LYXERR(Debug::FIND, "Before pasteParagraphList() cur=" << cur << endl); cap::pasteParagraphList(cur, repl_buffer.paragraphs(),