}
-LCursor::LCursor(BufferView * bv)
- : cursor_(1), anchor_(1), bv_(bv)
+LCursor::LCursor()
+ : cursor_(1), anchor_(1), bv_(0)
+{}
+
+
+LCursor::LCursor(BufferView & bv)
+ : cursor_(1), anchor_(1), bv_(&bv)
{}
void LCursor::updatePos()
{
if (cursor_.size() > 1)
- cached_y_ = bv_->top_y() + innerInset()->y();
+ cached_y_ = bv_->top_y() + cursor_.back().inset()->y();
}
Row const & row = *txt->cursorRow();
asc = row.baseline();
desc = row.height() - asc;
- } else
+ } else {
innerInset()->getCursorDim(asc, desc);
+ }
}