]> git.lyx.org Git - lyx.git/blobdiff - src/CutAndPaste.cpp
Attempt to fix #8137 (arrived at r40862).
[lyx.git] / src / CutAndPaste.cpp
index 2e0ae40f0b65e259e8c1324a085ff6b1b604737a..4914afb7cd16e1da36586022fd17b8c06df90245 100644 (file)
@@ -1111,7 +1111,7 @@ void pasteSelection(Cursor & cur, ErrorList & errorList)
 }
 
 
-void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwards)
+void replaceSelectionWithString(Cursor & cur, docstring const & str)
 {
        cur.recordUndo();
        DocIterator selbeg = cur.selectionBegin();
@@ -1130,13 +1130,6 @@ void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwa
 
        // Cut the selection
        cutSelection(cur, true, false);
-
-       // select the replacement
-       if (backwards) {
-               selbeg.pos() += str.length();
-               cur.setSelection(selbeg, -int(str.length()));
-       } else
-               cur.setSelection(selbeg, str.length());
 }