]> git.lyx.org Git - lyx.git/blobdiff - src/Text.cpp
Next step in fixing problems noted by Vincent: Remove magic boolean from
[lyx.git] / src / Text.cpp
index a0f4451ebb4529a2b8df3a89e3493213f09201f1..de977ffa8a6b62cd5f0dabd2a8cfa943761e59bf 100644 (file)
@@ -739,10 +739,9 @@ void Text::breakParagraph(Cursor & cur, bool inverse_logic)
                        break; // the character couldn't be deleted physically due to change tracking
        }
 
-       cur.buffer()->updateBuffer();
-
        // A singlePar update is not enough in this case.
        cur.screenUpdateFlags(Update::Force);
+       cur.forceBufferUpdate();
 
        // This check is necessary. Otherwise the new empty paragraph will
        // be deleted automatically. And it is more friendly for the user!
@@ -1316,7 +1315,7 @@ void Text::acceptOrRejectChanges(Cursor & cur, ChangeOp op)
        cur.clearSelection();
        setCursorIntern(cur, begPit, begPos);
        cur.screenUpdateFlags(Update::Force);
-       cur.buffer()->updateBuffer();
+       cur.forceBufferUpdate();
 }
 
 
@@ -1467,7 +1466,7 @@ bool Text::handleBibitems(Cursor & cur)
                cur.recordUndo(ATOMIC_UNDO, prevcur.pit());
                mergeParagraph(bufparams, cur.text()->paragraphs(),
                                                        prevcur.pit());
-               cur.buffer()->updateBuffer();
+               cur.forceBufferUpdate();
                setCursorIntern(cur, prevcur.pit(), prevcur.pos());
                cur.screenUpdateFlags(Update::Force);
                return true;
@@ -1495,7 +1494,7 @@ bool Text::erase(Cursor & cur)
                        cur.top().forwardPos();
 
                if (was_inset)
-                       cur.buffer()->updateBuffer();
+                       cur.forceBufferUpdate();
                else
                        cur.checkBufferStructure();
                needsUpdate = true;
@@ -1571,7 +1570,7 @@ bool Text::backspacePos0(Cursor & cur)
        }
 
        if (needsUpdate) {
-               cur.buffer()->updateBuffer();
+               cur.forceBufferUpdate();
                setCursorIntern(cur, prevcur.pit(), prevcur.pos());
        }
 
@@ -1611,7 +1610,7 @@ bool Text::backspace(Cursor & cur)
                bool const was_inset = cur.paragraph().isInset(cur.pos());
                cur.paragraph().eraseChar(cur.pos(), cur.buffer()->params().trackChanges);
                if (was_inset)
-                       cur.buffer()->updateBuffer();
+                       cur.forceBufferUpdate();
                else
                        cur.checkBufferStructure();
        }
@@ -1667,9 +1666,7 @@ bool Text::dissolveInset(Cursor & cur)
                cur.pit() = min(cur.lastpit(), spit);
                cur.pos() = min(cur.lastpos(), spos);
        } else
-               // this is the least that needs to be done (bug 6003)
-               // in the above case, pasteParagraphList handles this
-               cur.buffer()->updateBuffer();
+               cur.forceBufferUpdate();
 
        // Ensure the current language is set correctly (bug 6292)
        cur.text()->setCursor(cur, cur.pit(), cur.pos());