void RowPainter::paintLast() const
{
int const endlabel = getEndLabel(row_.pit(), text_);
-
- // paint imaginary end-of-paragraph character
-
- Change const & change = par_.lookupChange(par_.size());
- if (change.changed()) {
- FontMetrics const & fm =
- theFontMetrics(pi_.base.bv->buffer().params().getFont());
- int const length = fm.maxAscent() / 2;
- Color col = change.color();
-
- pi_.pain.line(int(x_) + 1, yo_ + 2, int(x_) + 1, yo_ + 2 - length, col,
- Painter::line_solid, 3);
-
- if (change.deleted()) {
- pi_.pain.line(int(x_) + 1 - length, yo_ + 2, int(x_) + 1 + length,
- yo_ + 2, col, Painter::line_solid, 3);
- } else {
- pi_.pain.line(int(x_) + 1 - length, yo_ + 2, int(x_) + 1,
- yo_ + 2, col, Painter::line_solid, 3);
- }
- }
-
- // draw an endlabel
-
switch (endlabel) {
case END_LABEL_BOX:
case END_LABEL_FILLED_BOX: {
// End of paragraph marker. The logic here is almost the
// same as in redoParagraph, remember keep them in sync.
ParagraphList const & pars = text_->paragraphs();
- if (lyxrc.paragraph_markers && !need_new_row
+ Change const & change = par.lookupChange(i);
+ if ((lyxrc.paragraph_markers || change.changed())
+ && !need_new_row
&& i == end && size_type(row.pit() + 1) < pars.size()) {
// add a virtual element for the end-of-paragraph
// marker; it is shown on screen, but does not exist
= text_->inset().buffer().params();
f.setLanguage(par.getParLanguage(bparams));
// ΒΆ U+00B6 PILCROW SIGN
- row.addVirtual(end, docstring(1, char_type(0x00B6)), f, Change());
+ row.addVirtual(end, docstring(1, char_type(0x00B6)), f, change);
}
// Is there a end-of-paragaph change?