- int y1 = (vt->y_base + y) % vt->total_height;
- int y2 = y1 - vt->y_displ;
- if (y2 < 0) {
- y2 += vt->total_height;
- }
- if (y2 < vt->height) {
- TextCell *c = &vt->cells[y1 * vt->width + x];
- c->attrib.selected = c->attrib.selected ? 0 : 1;
- spice_screen_draw_char(vt->screen, x, y, c->ch, c->attrib);
+ int y1 = (vt->y_displ + y) % vt->total_height;
+
+ TextCell *c = &vt->cells[y1 * vt->width + x];
+ c->attrib.selected = c->attrib.selected ? 0 : 1;
+
+ if (y < vt->height) {
+ draw_char_at(vt, x, y, c->ch, c->attrib);