From e5015c5d9632a0bf685c093249ae4a7d3e825b13 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sat, 21 May 2016 21:04:39 +0200 Subject: [PATCH] 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. --- src/nsterm.m | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index b815d775d76..d79e4f4017c 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); -- 2.39.2