Am 28.09.2010 um 13:33 schrieb Jürgen Spitzmüller:
> Stephan Witt wrote:
>> That would be the attached patch. Is this acceptable?
>
> I have not tested it and I did not check where exactly you have inserted the
> forward() calls. There's one possible unwanted change this could cause.
> Currently, in branch, if I add a replacement for an unknown spelling which is
> itself not in the dictionary, the spellchecker tells me this after I have hit
> "replace" (i.e., it rechecks the replaced word). Does this still work or does
> the spellchecker proceed to the next word without rechecking now?
Maybe, I don't understand you.
The complete code fragment using forward() looks like that:
====================
void GuiSpellchecker::forward()
{
dispatch(FuncRequest(LFUN_ESCAPE));
dispatch(FuncRequest(LFUN_CHAR_FORWARD));
}
void GuiSpellchecker::on_ignoreAllPB_clicked()
{
/// replace all occurrences of word
if (d->word_.lang() && !d->word_.word().empty())
theSpellChecker()->accept(d->word_);
forward();
check();
}
void GuiSpellchecker::on_addPB_clicked()
{
/// insert word in personal dictionary
theSpellChecker()->insert(d->word_);
forward();
check();
}
void GuiSpellchecker::on_ignorePB_clicked()
{
forward();
check();
}
====================
The "replace" operation itself I didn't touch.
In on_ignorePB_clicked I replaced the two dispatch calls by forward().
In on_ignoreAllPB_clicked and on_addPB_clicked I added the forward() call.
AFAIKS, the behavior you describe is currently not implemented.
Or as endless loop and you're describing the problem I want to solve
with other words...
If the speller cannot add the misspelled word to the ignore list or the
personal dictionary then the recheck will fail again, obviously and the
user cannot proceed as expected.
If you're saying the user should use "Ignore" instead of "Ignore all" in
this situation (like with 1.6.7?), we should tell Uwe that there
is no regression and the ticket he made is invalid.
Stephan