}
-pit_type BufferView::anchor_ref() const
-{
- return d->anchor_pit_;
-}
-
-
bool BufferView::singleParUpdate()
{
Text & buftext = buffer_.text();
bool sliceInRow(CursorSlice const & cs, Text const * text, Row const & row)
{
return !cs.empty() && cs.text() == text && cs.pit() == row.pit()
- && row.pos() <= cs.pos() && cs.pos() <= row.endpos();
+ && row.pos() <= cs.pos() && cs.pos() < row.endpos();
}
}
}
// Remember what has just been done for the next draw() step
- if (paint_caret)
+ if (paint_caret) {
d->caret_slice_ = d->cursor_.top();
- else
+ if (d->cursor_.boundary()
+ || d->cursor_.top().pos() == d->cursor_.top().lastpos())
+ --d->caret_slice_.pos();
+ } else
d->caret_slice_ = CursorSlice();
}