}
-void replaceSelectionWithString(Cursor & cur, docstring const & str, bool backwards)
+void replaceSelectionWithString(Cursor & cur, docstring const & str)
{
cur.recordUndo();
DocIterator selbeg = cur.selectionBegin();
// 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());
}