X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FText.cpp;h=f392cee9209a0211a6ed29b338591892277c120e;hb=1512439fa4546a5370d69c88d0350ccbcab7611b;hp=a0f4451ebb4529a2b8df3a89e3493213f09201f1;hpb=0e14f379f367e4d3f5f8263185e0903424a746e7;p=lyx.git diff --git a/src/Text.cpp b/src/Text.cpp index a0f4451ebb..f392cee920 100644 --- a/src/Text.cpp +++ b/src/Text.cpp @@ -53,7 +53,6 @@ #include "insets/InsetText.h" #include "insets/InsetBibitem.h" #include "insets/InsetCaption.h" -#include "insets/InsetLine.h" #include "insets/InsetNewline.h" #include "insets/InsetNewpage.h" #include "insets/InsetArgument.h" @@ -452,11 +451,6 @@ void Text::readParToken(Paragraph & par, Lexer & lex, auto_ptr inset(new InsetTabular(buf)); inset->read(lex); par.insertInset(par.size(), inset.release(), font, change); - } else if (token == "\\lyxline") { - auto_ptr inset; - inset.reset(new InsetLine); - inset->setBuffer(*buf); - par.insertInset(par.size(), inset.release(), font, change); } else if (token == "\\change_unchanged") { change = Change(Change::UNCHANGED); } else if (token == "\\change_inserted" || token == "\\change_deleted") { @@ -739,10 +733,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 +1309,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 +1460,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 +1488,7 @@ bool Text::erase(Cursor & cur) cur.top().forwardPos(); if (was_inset) - cur.buffer()->updateBuffer(); + cur.forceBufferUpdate(); else cur.checkBufferStructure(); needsUpdate = true; @@ -1571,7 +1564,7 @@ bool Text::backspacePos0(Cursor & cur) } if (needsUpdate) { - cur.buffer()->updateBuffer(); + cur.forceBufferUpdate(); setCursorIntern(cur, prevcur.pit(), prevcur.pos()); } @@ -1611,7 +1604,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 +1660,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());