From: Jean-Marc Lasgouttes Date: Mon, 22 Nov 2004 14:56:14 +0000 (+0000) Subject: update the screen while spellchecking and merging changes X-Git-Tag: 1.6.10~14807 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=ce2cab27325bd072a4b683157400cb3a88ee1e95;p=features.git update the screen while spellchecking and merging changes git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9289 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/po/POTFILES.in b/po/POTFILES.in index 1304ef41bf..8cd4ed3c54 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -49,6 +49,7 @@ src/frontends/gtk/GMathsMatrix.C src/frontends/gtk/GNote.C src/frontends/gtk/GParagraph.C src/frontends/gtk/GSearch.C +src/frontends/gtk/GSendto.C src/frontends/gtk/GShowFile.C src/frontends/gtk/GSpellchecker.C src/frontends/gtk/GTableCreate.C diff --git a/src/ChangeLog b/src/ChangeLog index 8a02027c49..f70d86ac62 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2004-11-22 Jean-Marc Lasgouttes + + * lyxfind.C (findNextChange): update the bufferview after setting + the selection + 2004-11-16 Jean-Marc Lasgouttes * text3.C (getStatus): disable LFUN_INSET_OPTARG when the max diff --git a/src/frontends/controllers/ChangeLog b/src/frontends/controllers/ChangeLog index 3bcae6a752..93a0439272 100644 --- a/src/frontends/controllers/ChangeLog +++ b/src/frontends/controllers/ChangeLog @@ -1,3 +1,8 @@ +2004-11-22 Jean-Marc Lasgouttes + + * ControlSpellchecker.C (check): update the view when setting the + selection + 2004-11-18 Jean-Marc Lasgouttes * ControlSpellchecker.C (nextWord): rewrite to skip words diff --git a/src/frontends/controllers/ControlSpellchecker.C b/src/frontends/controllers/ControlSpellchecker.C index 9f8098806a..0321b166dc 100644 --- a/src/frontends/controllers/ControlSpellchecker.C +++ b/src/frontends/controllers/ControlSpellchecker.C @@ -199,8 +199,10 @@ void ControlSpellchecker::check() word_ = nextWord(cur, start, bufferparams); // end of document - if (getWord().empty()) - break; + if (getWord().empty()) { + showSummary(); + return; + } ++count_; @@ -227,14 +229,15 @@ void ControlSpellchecker::check() lyxerr[Debug::GUI] << "Found word \"" << getWord() << "\"" << endl; - if (getWord().empty()) { - showSummary(); - return; - } - int const size = getWord().size(); cur.pos() -= size; kernel().bufferview()->putSelectionAt(cur, size, false); + // if we used a lfun like in find/replace, dispatch would do + // that for us + kernel().bufferview()->update(); + if (kernel().bufferview()->fitCursor()) + kernel().bufferview()->update(); + // set suggestions if (res != SpellBase::OK && res != SpellBase::IGNORE) { diff --git a/src/lyxfind.C b/src/lyxfind.C index ee0f53dda0..a8100fdd83 100644 --- a/src/lyxfind.C +++ b/src/lyxfind.C @@ -363,6 +363,11 @@ bool findNextChange(BufferView * bv) } pos_type length = end - pos; bv->putSelectionAt(cur, length, false); + // if we used a lfun like in find/replace, dispatch would do + // that for us + bv->update(); + if (bv->fitCursor()) + bv->update(); return true; }