summaryrefslogtreecommitdiff
path: root/src/xterm.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 717df452569..b6430ad11b0 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -7133,7 +7133,8 @@ x_draw_hollow_cursor (struct window *w, struct glyph_row *row)
&& cursor_glyph->pixel_width > w->phys_cursor_width)
{
x += cursor_glyph->pixel_width - w->phys_cursor_width;
- wd -= 1;
+ if (wd > 0)
+ wd -= 1;
}
/* Set clipping, draw the rectangle, and reset clipping again. */
x_clip_to_row (w, row, TEXT_AREA, gc);