This bug report
http://bugzilla.lyx.org/show_bug.cgi?id=1876

says that LyX 1.4.x will not spell check the very first word of the
document if the cursor is placed at the beginning of that paragraph (just
before the first letter at position 0).

The offending code, together with the proposed patch is:

    DocIterator cur = kernel().bufferview()->cursor();
    ptrdiff_t start = 0, total = 0;
    DocIterator it = DocIterator(kernel().buffer().inset());

+   if (cur.pos()!=0) {
        for (start = 0; it != cur; it.forwardPos())
                ++start;

        for (total = start; it; it.forwardPos())
                ++total;

        for (; cur && isLetter(cur); cur.forwardPos())
                ++start;
+   }

Unfortunately, I understand neither the code nor the fix. (I understand
that it is incrementing the start and total flags but little more.) Can
someone explain?

Angus (tired)

Reply via email to