- long bottom = min(max(text->sel_end_cursor.y()
- - text->sel_end_cursor.row()->baseline()
- + text->sel_end_cursor.row()->height(), text->first),
- text->first + owner.height());
- long top = min(max(text->sel_start_cursor.y()
- - text->sel_start_cursor.row()->baseline(), text->first),
- text->first + owner.height());
+ int const bottom = min(
+ max(static_cast<int>(text->sel_end_cursor.y()
+ - text->sel_end_cursor.row()->baseline()
+ + text->sel_end_cursor.row()->height()),
+ text->first),
+ static_cast<int>(text->first + owner.height()));
+ int const top = min(
+ max(static_cast<int>(text->sel_start_cursor.y() -
+ text->sel_start_cursor.row()->baseline()),
+ text->first),
+ static_cast<int>(text->first + owner.height()));