Commit bf5ddded authored by Alan Third's avatar Alan Third

Prevent bar cursor overwriting next glyph (bug#16856)

* src/nsterm.m (ns_draw_window_cursor): Test glyph width vs cursor width
before setting final size.
parent a80ee12a
......@@ -2861,7 +2861,10 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row,
{
if (cursor_width < 1)
cursor_width = max (FRAME_CURSOR_WIDTH (f), 1);
w->phys_cursor_width = cursor_width;
/* The bar cursor should never be wider than the glyph. */
if (cursor_width < w->phys_cursor_width)
w->phys_cursor_width = cursor_width;
}
/* If we have an HBAR, "cursor_width" MAY specify height. */
else if (cursor_type == HBAR_CURSOR)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment