#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"
auto_ptr<Inset> inset(new InsetTabular(buf));
inset->read(lex);
par.insertInset(par.size(), inset.release(), font, change);
- } else if (token == "\\lyxline") {
- auto_ptr<Inset> 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") {
// Initialize begin_of_body_ on load; redoParagraph maintains
par.setBeginOfBody();
+
+ // mark paragraph for spell checking on load
+ // par.requestSpellCheck();
}
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.updateFlags(Update::Force);
+ 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!
// 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;
}
}
cur.buffer()->params().trackChanges);
cur.checkBufferStructure();
-// cur.updateFlags(Update::Force);
+// cur.screenUpdateFlags(Update::Force);
bool boundary = cur.boundary()
|| tm.isRTLBoundary(cur.pit(), cur.pos() + 1);
setCursor(cur, cur.pit(), cur.pos() + 1, false, boundary);
cur.finishUndo();
cur.clearSelection();
setCursorIntern(cur, begPit, begPos);
- cur.updateFlags(Update::Force);
- cur.buffer()->updateBuffer();
+ cur.screenUpdateFlags(Update::Force);
+ cur.forceBufferUpdate();
}
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.updateFlags(Update::Force);
+ cur.screenUpdateFlags(Update::Force);
return true;
}
cur.top().forwardPos();
if (was_inset)
- cur.buffer()->updateBuffer();
+ cur.forceBufferUpdate();
else
cur.checkBufferStructure();
needsUpdate = true;
}
if (needsUpdate) {
- cur.buffer()->updateBuffer();
+ cur.forceBufferUpdate();
setCursorIntern(cur, prevcur.pit(), prevcur.pos());
}
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();
}
needsUpdate |= handleBibitems(cur);
// A singlePar update is not enough in this case.
-// cur.updateFlags(Update::Force);
+// cur.screenUpdateFlags(Update::Force);
setCursor(cur.top(), cur.pit(), cur.pos());
return needsUpdate;
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());
LASSERT(cur.bv().cursor() == cur, /**/);
cur.insert(s);
cur.bv().cursor() = cur;
- if (!(cur.result().update() & Update::Force))
- cur.updateFlags(cur.result().update() | Update::SinglePar);
+ if (!(cur.result().screenUpdate() & Update::Force))
+ cur.screenUpdateFlags(cur.result().screenUpdate() | Update::SinglePar);
return true;
}