X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText.cpp;h=d00d2d5356ee710b7fa26a2e9df288173a89a118;hb=8b7584846c4e1a9c87a004fab479722fee7e3013;hp=702bcdf78041f26e8cbfabf1de7421e806c1c7b7;hpb=dec437fbac739fb4d8e78842b9f9286bbaaf0971;p=lyx.git diff --git a/src/Text.cpp b/src/Text.cpp index 702bcdf780..d00d2d5356 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -936,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; } } @@ -2036,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; }