]> code.delx.au - gnu-emacs/commitdiff
Fix bug#16856, cursor leaves garbage in fringe on OS X.
authorAlan Third <alan@idiocy.org>
Sat, 21 May 2016 19:04:39 +0000 (21:04 +0200)
committerAnders Lindgren <andlind@gmail.com>
Sat, 21 May 2016 19:04:39 +0000 (21:04 +0200)
* src/nsterm.m (ns_draw_window_cursor): Prevent the cursor from
being drawn outside the text area.

src/nsterm.m

index b815d775d765553329dac664530f6e783ab2113d..d79e4f4017ccb5bdf8900bbd8af0edd0bb853c53 100644 (file)
@@ -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);