#include "TextClass.h"
#include "VSpace.h"
+#include "insets/InsetSeparator.h"
#include "insets/InsetText.h"
#include "mathed/MacroTable.h"
if (Inset const * inset = par.getInset(row.pos())) {
if (inset->rowFlags() & Display) {
if (inset->rowFlags() & AlignLeft)
- align = LYX_ALIGN_BLOCK;
+ align = LYX_ALIGN_LEFT;
else if (inset->rowFlags() & AlignRight)
align = LYX_ALIGN_RIGHT;
else
public:
//
- flexible_const_iterator operator++() {
+ flexible_const_iterator & operator++() {
if (pile_.empty())
++cit_;
else
rb.push_back(elt);
rb.finalizeLast();
if (rb.width() > width) {
- LATTEST(tail.empty());
+ // Keep the tail for later; this ought to be rare, but play safe.
+ if (!tail.empty())
+ fcit.put(tail);
// if the row is too large, try to cut at last separator.
tail = rb.shortenIfNeeded(width, next_width);
}
}
}
- // This happens after sections or environments in standard classes.
- // We have to check the previous layout at same depth.
+ // Check for reasons to remove indentation.
+ // First, at document level.
if (buffer.params().paragraph_separation ==
BufferParams::ParagraphSkipSeparation)
parindent.erase();
+ // This happens after sections or environments in standard classes.
+ // We have to check the previous layout at same depth.
else if (pit > 0 && pars[pit - 1].getDepth() >= par.getDepth()) {
pit_type prev = text_->depthHook(pit, par.getDepth());
if (par.layout() == pars[prev].layout()) {
} else if (pars[prev].layout().nextnoindent)
parindent.erase();
}
+ // The previous paragraph may have ended with a separator inset.
+ if (pit > 0) {
+ Paragraph const & ppar = pars[pit - 1];
+ if (ppar.size() > 0) {
+ auto * in = dynamic_cast<InsetSeparator const *>(ppar.getInset(ppar.size() - 1));
+ if (in != nullptr && in->nextnoindent())
+ parindent.erase();
+ }
+ }
FontInfo const labelfont = text_->labelFont(par);
FontMetrics const & lfm = theFontMetrics(labelfont);
swap(pi.leftx, pi.rightx);
BookmarksSection::BookmarkPosList bpl =
- theSession().bookmarks().bookmarksInPar(bv_->buffer().fileName(), pm.par().id());
+ theSession().bookmarks().bookmarksInPar(bv_->buffer().fileName(), pm.id());
for (size_t i = 0; i != nrows; ++i) {