bv->text->sel_cursor = bv->text->cursor;
for (int i = 0; i < len; ++i)
bv->text->CursorRight(bv);
- bv->text->SetSelection(bv);
+ bv->text->SetSelection();
}
// in order to avoid endless loop :-(
if (SF.SearchString().length() == 0
|| (SF.SearchString().length() == 1
- && SF.SearchString()[0] == ' ') ) {
+ && SF.SearchString()[0] == ' ')) {
WriteAlert(_("Sorry!"), _("You cannot replace a single space, "
"nor an empty character."));
return;
// clear the selection (if there is any)
bv->toggleSelection(false);
bv->text->
- ReplaceSelectionWithString(bv, replacestring.c_str());
+ ReplaceSelectionWithString(bv, replacestring);
bv->text->
- SetSelectionOverString(bv, replacestring.c_str());
+ SetSelectionOverString(bv, replacestring);
bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
}
// in order to avoid endless loop :-(
if (SF.SearchString().length() == 0
|| (SF.SearchString().length() == 1
- && SF.SearchString()[0] == ' ') ) {
+ && SF.SearchString()[0] == ' ')) {
WriteAlert(_("Sorry!"), _("You cannot replace a single space, "
"nor an empty character."));
return;
bv->update(BufferView::SELECT|BufferView::FITCUR);
bv->toggleSelection(false);
bv->text->
- ReplaceSelectionWithString(bv, replacestring.c_str());
+ ReplaceSelectionWithString(bv, replacestring);
bv->text->
- SetSelectionOverString(bv, replacestring.c_str());
+ SetSelectionOverString(bv, replacestring);
bv->update(BufferView::SELECT|BufferView::FITCUR|BufferView::CHANGE);
++replace_count;
}
} while (SearchCB(true));
- if( replace_count == 0 ) {
+ if (replace_count == 0) {
LyXBell();
bv->owner()->getMiniBuffer()->Set(
_("String not found!"));