-void BufferView::undo()
-{
- if (!available())
- return;
-
- owner()->message(_("Undo"));
- beforeChange(text);
- if (!textUndo(this))
- owner()->message(_("No further undo information"));
- update();
- switchKeyMap();
-}
-
-
-void BufferView::redo()
-{
- if (!available())
- return;
-
- owner()->message(_("Redo"));
- beforeChange(text);
- if (!textRedo(this))
- owner()->message(_("No further redo information"));
- update();
- switchKeyMap();
-}
-
-
-// these functions are for the spellchecker
-WordLangTuple const BufferView::nextWord(float & value)
-{
- if (!available()) {
- value = 1;
- return WordLangTuple();
- }
-
- return text->selectNextWordToSpellcheck(value);
-}
-
-
-void BufferView::selectLastWord()
-{
- if (!available())
- return;
-
- LyXCursor cur = text->selection.cursor;
- beforeChange(text);
- text->selection.cursor = cur;
- text->selectSelectedWord();
- update();
-}
-
-
-void BufferView::endOfSpellCheck()
-{
- if (!available()) return;
-
- beforeChange(text);
- text->selectSelectedWord();
- text->clearSelection();
- update();
-}
-
-
-void BufferView::replaceWord(string const & replacestring)
-{
- if (!available())
- return;
-
- LyXText * tt = getLyXText();
-
- tt->replaceSelectionWithString(replacestring);
- tt->setSelectionRange(replacestring.length());
-
- // Go back so that replacement string is also spellchecked
- for (string::size_type i = 0; i < replacestring.length() + 1; ++i)
- tt->cursorLeft(this);
-
- // FIXME: should be done through LFUN
- buffer()->markDirty();
- update();
-}
-
-
-bool BufferView::lockInset(UpdatableInset * inset)