]> git.lyx.org Git - lyx.git/blobdiff - src/trans_mgr.C
layout file converter for layout files in old format
[lyx.git] / src / trans_mgr.C
index ba9bb1e35fca87a347d251bfef5a8a79436537e3..58a1c1874e7a98b750cb376136a06ab2bf1aea06 100644 (file)
@@ -14,6 +14,7 @@
 #include "trans_mgr.h"
 
 #include "BufferView.h"
+#include "CutAndPaste.h"
 #include "cursor.h"
 #include "debug.h"
 #include "lyxrc.h"
@@ -284,7 +285,10 @@ void TransManager::insert(string const & str, LyXText * text)
                // Could not find an encoding
                InsetLatexAccent ins(str);
                if (ins.canDisplay()) {
-                       text->bv()->cursor().insert(new InsetLatexAccent(ins));
+                       LCursor & cur = text->bv()->cursor();
+                       lyx::cap::replaceSelection(cur);
+                       cur.insert(new InsetLatexAccent(ins));
+                       cur.posRight();
                } else {
                        insertVerbatim(str, text);
                }