X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FCutAndPaste.cpp;h=4914afb7cd16e1da36586022fd17b8c06df90245;hb=8ea66efe16ad109a5c107716185fb82bbebca8c8;hp=2e0ae40f0b65e259e8c1324a085ff6b1b604737a;hpb=e409eedc5bd77d80af93a0b7c3ce19c53db8fbf0;p=lyx.git diff --git a/src/CutAndPaste.cpp b/src/CutAndPaste.cpp index 2e0ae40f0b..4914afb7cd 100644 --- a/src/CutAndPaste.cpp +++ b/src/CutAndPaste.cpp @@ -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()); }