// FED FED| FED )
if (startpos == pos && endpos == pos && endpos != par.size()
&& (par.isNewline(pos - 1)
- || par.isEnvSeparator(pos - 1)
|| par.isLineSeparator(pos - 1)
|| par.isSeparator(pos - 1)))
return false;
if (ns
&& row.endpos() < par.size()
&& !par.isNewline(row.endpos() - 1)
- && !par.isEnvSeparator(row.endpos() - 1)
&& !disp_inset
) {
row.separator = w / ns;
Paragraph const & par = text_->getPar(pit);
pos_type last = par.beginOfBody();
- LBUFERR(last > 0 || par.isEnvSeparator(0));
+ LBUFERR(last > 0);
// -1 because a label ends with a space that is in the label
--last;
// a separator at this end does not count
- if (last >= 0 && par.isLineSeparator(last))
+ if (par.isLineSeparator(last))
--last;
int w = 0;
break;
}
- if (par.isNewline(i) || par.isEnvSeparator(i)) {
+ if (par.isNewline(i)) {
point = i + 1;
break;
}
if (lastrow &&
((rtl_on_lastrow && left_side && vc == row.pos() && x < tmpx - 5) ||
(!rtl_on_lastrow && !left_side && vc == end && x > tmpx + 5))) {
- if (!(par.isNewline(end - 1) || par.isEnvSeparator(end - 1)))
+ if (!par.isNewline(end - 1))
c = end;
} else if (vc == row.pos()) {
c = bidi.vis2log(vc);
if (!c || end == par.size())
return col;
- if (c==end && !par.isLineSeparator(c-1)
- && !par.isNewline(c-1)
- && !par.isEnvSeparator(c-1)) {
+ if (c==end && !par.isLineSeparator(c-1) && !par.isNewline(c-1)) {
boundary = true;
return col;
}
bool boundary = false;
if (end != cur.lastpos()) {
if (!cur.paragraph().isLineSeparator(end-1)
- && !cur.paragraph().isNewline(end-1)
- && !cur.paragraph().isEnvSeparator(end-1))
+ && !cur.paragraph().isNewline(end-1))
boundary = true;
else
--end;
l_margin = leftMargin(max_width, newpar);
// Remove the parindent that has been added
// if the paragraph was empty.
- if (pars[newpar].empty() &&
- buffer.params().paragraph_separation ==
- BufferParams::ParagraphIndentSeparation) {
+ if (pars[newpar].empty()) {
docstring pi = pars[newpar].layout().parindent;
l_margin -= theFontMetrics(
buffer.params().getFont()).signedWidth(pi);
// This happens after sections or environments in standard classes.
// We have to check the previous layout at same depth.
- if (buffer.params().paragraph_separation ==
- BufferParams::ParagraphSkipSeparation)
- parindent.erase();
- else if (pit > 0 && pars[pit - 1].getDepth() >= par.getDepth()) {
+ if (tclass.isDefaultLayout(par.layout()) && pit > 0
+ && pars[pit - 1].getDepth() >= par.getDepth()) {
pit_type prev = text_->depthHook(pit, par.getDepth());
- if (par.layout() == pars[prev].layout()) {
- if (prev != pit - 1
- && pars[pit - 1].layout().nextnoindent)
- parindent.erase();
- } else if (pars[prev].layout().nextnoindent)
+ if (pars[prev < pit ? prev : pit - 1].layout().nextnoindent)
parindent.erase();
}