diff --git a/src/BufferView2.C b/src/BufferView2.C index 21f99d0e33..c130c1d51f 100644 --- a/src/BufferView2.C +++ b/src/BufferView2.C @@ -346,8 +346,10 @@ void BufferView::selectLastWord() { if (!available()) return; + LyXCursor cur = text->selection.cursor; hideCursor(); beforeChange(text); + text->selection.cursor = cur; text->selectSelectedWord(this); toggleSelection(false); update(text, BufferView::SELECT|BufferView::FITCUR); diff --git a/src/ChangeLog b/src/ChangeLog index a4ad4a6f96..16dcba7583 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2001-08-10 Juergen Vigna + + * BufferView2.C (selectLastWord): save the selection cursor as this + now is cleared in the function LyXText::clearSelection! + 2001-08-08 Juergen Vigna * BufferView_pimpl.C (Dispatch): use a non-cut-buffer cut on DELTE diff --git a/src/text.C b/src/text.C index 0d49609619..6a80460c7a 100644 --- a/src/text.C +++ b/src/text.C @@ -2264,7 +2264,7 @@ bool LyXText::selectWordWhenUnderCursor(BufferView * bview, // This function is only used by the spellchecker for NextWord(). // It doesn't handle LYX_ACCENTs and probably never will. string const LyXText::selectNextWord(BufferView * bview, - float & value) const + float & value) const { if (the_locking_inset) { string str = the_locking_inset->selectNextWord(bview, value);