Fix cursor not being rendered on empty cells

This commit is contained in:
Kovid Goyal 2017-09-15 11:08:42 +05:30
parent 44c897a61a
commit f0a9f32d0a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -481,7 +481,7 @@ render_cursor(Window *w, double now) {
double left = rd->xstart + cursor->x * rd->dx;
double top = rd->ystart - cursor->y * rd->dy;
int shape = cursor->shape ? cursor->shape : OPT(cursor_shape);
unsigned long mult = screen_current_char_width(rd->screen);
unsigned long mult = MAX(1, screen_current_char_width(rd->screen));
double right = left + (shape == CURSOR_BEAM ? cursor_width(1.5, true) : rd->dx * mult);
double bottom = top - rd->dy;
if (shape == CURSOR_UNDERLINE) top = bottom + cursor_width(2.0, false);