]> git.lyx.org Git - features.git/commitdiff
Now the local text language is kept while replacing text (addressing #6171).
authorTommaso Cucinotta <tommaso@lyx.org>
Mon, 11 Jan 2010 02:20:51 +0000 (02:20 +0000)
committerTommaso Cucinotta <tommaso@lyx.org>
Mon, 11 Jan 2010 02:20:51 +0000 (02:20 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32961 a592a061-630c-0410-9148-cb99ea01b6c8

src/lyxfind.cpp

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