From: Alan Third Date: Sat, 21 May 2016 19:04:39 +0000 (+0200) Subject: Fix bug#16856, cursor leaves garbage in fringe on OS X. X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/e5015c5d9632a0bf685c093249ae4a7d3e825b13 Fix bug#16856, cursor leaves garbage in fringe on OS X. * src/nsterm.m (ns_draw_window_cursor): Prevent the cursor from being drawn outside the text area. --- diff --git a/src/nsterm.m b/src/nsterm.m index b815d775d7..d79e4f4017 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2873,9 +2873,8 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, r.size.height = h; r.size.width = w->phys_cursor_width; - /* TODO: only needed in rare cases with last-resort font in HELLO.. - should we do this more efficiently? */ - ns_clip_to_row (w, glyph_row, ANY_AREA, NO); /* do ns_focus(f, &r, 1); if remove */ + /* Prevent the cursor from being drawn outside the text area. */ + ns_clip_to_row (w, glyph_row, TEXT_AREA, NO); /* do ns_focus(f, &r, 1); if remove */ face = FACE_OPT_FROM_ID (f, phys_cursor_glyph->face_id);