-void BufferView::undo()
-{
- if (!available())
- return;
-
- owner()->message(_("Undo"));
- text_->clearSelection();
- if (!textUndo(this))
- owner()->message(_("No further undo information"));
- update();
- switchKeyMap();
-}
-
-
-void BufferView::redo()
-{
- if (!available())
- return;
-
- owner()->message(_("Redo"));
- text_->clearSelection();
- if (!textRedo(this))
- owner()->message(_("No further redo information"));
- update();
- switchKeyMap();
-}
-
-
-void BufferView::replaceWord(string const & replacestring)
-{
- if (!available())
- return;
-
- LyXText * t = getLyXText();
-
- t->replaceSelectionWithString(replacestring);
- t->setSelectionRange(replacestring.length());
-
- // Go back so that replacement string is also spellchecked
- for (string::size_type i = 0; i < replacestring.length() + 1; ++i)
- t->cursorLeft(this);
-
- // FIXME: should be done through LFUN
- buffer()->markDirty();
- update();
-}
-
-