Now the local text language is kept while replacing text (addressing #6171).

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32961 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Tommaso Cucinotta 2010-01-11 02:20:51 +00:00
parent 8c11a45b99
commit ddebdc4514

View File

@ -1178,6 +1178,9 @@ bool findAdv(BufferView * bv, FindAndReplaceOptions const & opt)
Buffer repl_buffer("", false); Buffer repl_buffer("", false);
repl_buffer.setUnnamed(true); repl_buffer.setUnnamed(true);
if (repl_buffer.readString(lyx)) { if (repl_buffer.readString(lyx)) {
repl_buffer.changeLanguage(
repl_buffer.language(),
bv->cursor().getFont().language());
if (opt.keep_case && match_len >= 2) { if (opt.keep_case && match_len >= 2) {
if (cur.inTexted()) { if (cur.inTexted()) {
if (firstUppercase(cur)) if (firstUppercase(cur))