From 3b870366b4633c9e0b9cbd48b608392c5e768c74 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=BCrgen=20Vigna?= Date: Fri, 10 Aug 2001 11:07:07 +0000 Subject: [PATCH] Fixed "non selection" when hit a word with the spellchecker. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2479 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView2.C | 2 ++ src/ChangeLog | 5 +++++ src/text.C | 2 +- 3 files changed, 8 insertions(+), 1 deletion(-) 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); -- 2.39.5