X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText.cpp;h=d00d2d5356ee710b7fa26a2e9df288173a89a118;hb=023afde520e1a397996c09d203efa5573d832e85;hp=f392cee9209a0211a6ed29b338591892277c120e;hpb=0e7ab29f49c899cb4fa3b9134cca238ff540a48f;p=lyx.git diff --git a/src/Text.cpp b/src/Text.cpp index f392cee920..d00d2d5356 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -519,6 +519,9 @@ void Text::readParagraph(Paragraph & par, Lexer & lex, // Initialize begin_of_body_ on load; redoParagraph maintains par.setBeginOfBody(); + + // mark paragraph for spell checking on load + // par.requestSpellCheck(); } @@ -933,23 +936,17 @@ void Text::insertChar(Cursor & cur, char_type c) // disable the double-space checking if (!freeSpacing && isLineSeparatorChar(c)) { if (cur.pos() == 0) { - static bool sent_space_message = false; - if (!sent_space_message) { - cur.message(_("You cannot insert a space at the " - "beginning of a paragraph. Please read the Tutorial.")); - sent_space_message = true; - } + cur.message(_( + "You cannot insert a space at the " + "beginning of a paragraph. Please read the Tutorial.")); return; } LASSERT(cur.pos() > 0, /**/); if ((par.isLineSeparator(cur.pos() - 1) || par.isNewline(cur.pos() - 1)) - && !par.isDeleted(cur.pos() - 1)) { - static bool sent_space_message = false; - if (!sent_space_message) { - cur.message(_("You cannot type two spaces this way. " - "Please read the Tutorial.")); - sent_space_message = true; - } + && !par.isDeleted(cur.pos() - 1)) { + cur.message(_( + "You cannot type two spaces this way. " + "Please read the Tutorial.")); return; } } @@ -2033,8 +2030,8 @@ bool Text::insertCompletion(Cursor & cur, docstring const & s, bool /*finished*/ LASSERT(cur.bv().cursor() == cur, /**/); cur.insert(s); cur.bv().cursor() = cur; - if (!(cur.result().update() & Update::Force)) - cur.screenUpdateFlags(cur.result().update() | Update::SinglePar); + if (!(cur.result().screenUpdate() & Update::Force)) + cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar); return true; }