]> git.lyx.org Git - features.git/commitdiff
Fix bug 6650: Error Messages Repeated
authorPeter Kümmel <syntheticpp@gmx.net>
Sun, 17 Oct 2010 12:06:47 +0000 (12:06 +0000)
committerPeter Kümmel <syntheticpp@gmx.net>
Sun, 17 Oct 2010 12:06:47 +0000 (12:06 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35664 a592a061-630c-0410-9148-cb99ea01b6c8

src/Cursor.cpp
src/Text.cpp

index 16067119e3eb376586b450d0349277b6084f7ba7..45745798da27f3314bdb61266c65fc3cf2407497 100644 (file)
@@ -332,6 +332,7 @@ void Cursor::dispatch(FuncRequest const & cmd0)
        fixIfBroken();
        FuncRequest cmd = cmd0;
        Cursor safe = *this;
+       disp_ = DispatchResult();
 
        buffer()->undo().beginUndoGroup();
        
index 77385f0419fde380193729f1d724d2bc6b2e870b..d00d2d5356ee710b7fa26a2e9df288173a89a118 100644 (file)
@@ -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;
                }
        }