]> git.lyx.org Git - features.git/commitdiff
Fixed "non selection" when hit a word with the spellchecker.
authorJürgen Vigna <jug@sad.it>
Fri, 10 Aug 2001 11:07:07 +0000 (11:07 +0000)
committerJürgen Vigna <jug@sad.it>
Fri, 10 Aug 2001 11:07:07 +0000 (11:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@2479 a592a061-630c-0410-9148-cb99ea01b6c8

src/BufferView2.C
src/ChangeLog
src/text.C

index 21f99d0e33c0625eca258e7eba5b50b82234d0e1..c130c1d51fe963b65a9be75103386315ccb4f808 100644 (file)
@@ -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);
index a4ad4a6f961bcdf234399c195d8129bacd449ba5..16dcba7583794e3ac3c58710f7fb7b2bbde1e87e 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-10  Juergen Vigna  <jug@sad.it>
+
+       * BufferView2.C (selectLastWord): save the selection cursor as this
+       now is cleared in the function LyXText::clearSelection!
+
 2001-08-08  Juergen Vigna  <jug@sad.it>
 
        * BufferView_pimpl.C (Dispatch): use a non-cut-buffer cut on DELTE
index 0d49609619f92bb7c0c5531caa6230e4a914e34a..6a80460c7afbf422c5bd3c9c2a251e4770cc7aa2 100644 (file)
@@ -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);