clear the last selection first (this happens when the selection lives inside other than bv_->text)
please apply thanks john -- "This is mindless pedantism up with which I will not put." - Donald Knuth on Pascal's lack of default: case statement
Index: src/frontends/controllers/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v retrieving revision 1.130 diff -u -r1.130 ChangeLog --- src/frontends/controllers/ChangeLog 2002/02/01 09:57:44 1.130 +++ src/frontends/controllers/ChangeLog 2002/02/01 14:00:52 @@ -1,3 +1,8 @@ +2002-02-01 John Levon <[EMAIL PROTECTED]> + + * ControlSpellchecker.C: clear any selection left + (bug #211) + 2002-02-01 Herbert Voss <[EMAIL PROTECTED]> * ControlGraphics.[C] (readBB): search only, if it is a Index: src/frontends/controllers/ControlSpellchecker.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlSpellchecker.C,v retrieving revision 1.14 diff -u -r1.14 ControlSpellchecker.C --- src/frontends/controllers/ControlSpellchecker.C 2002/01/16 14:47:57 1.14 +++ src/frontends/controllers/ControlSpellchecker.C 2002/02/01 14:00:52 @@ -34,6 +34,7 @@ #include "lyxrc.h" #include "BufferView.h" #include "LyXView.h" +#include "lyxtext.h" #include "gettext.h" #include "support/lstrings.h" #include "language.h" @@ -109,6 +110,11 @@ result_ = SpellBase::ISP_OK; stop_ = false; + // clear any old selection + LyXText * text = lv_.view()->getLyXText(); + lv_.view()->toggleSelection(true); + lv_.view()->update(text, BufferView::SELECT); + while ((result_==SpellBase::ISP_OK || result_==SpellBase::ISP_IGNORE) && !stop_) { word_ = lv_.view()->nextWord(newval_);