From: Alp Aker Date: Wed, 10 Sep 2014 17:56:38 +0000 (-0400) Subject: * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other terms to determine... X-Git-Tag: emacs-25.0.90~2635^2~679^2~313 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1014b530f59b332e9ae53c1d0d90f6074b1fca6c;p=emacs.git * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other terms to determine bitmap color. (Bug#18437) --- diff --git a/src/ChangeLog b/src/ChangeLog index 0b3aa8e22ec..5498a07a0da 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-09-10 Alp Aker + + * nsterm.m (ns_draw_fringe_bitmap): Use the same logic as other + terms to determine bitmap color. (Bug#18437) + 2014-09-10 Eli Zaretskii * w32.c (sys_write): Use SAFE_NALLOCA for the NL -> CRLF diff --git a/src/nsterm.m b/src/nsterm.m index 47ad28aaa61..dc775fc417a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2347,7 +2347,18 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row *row, to erase the whole background. */ [ns_lookup_indexed_color(face->background, f) set]; NSRectFill (r); - [img setXBMColor: ns_lookup_indexed_color(face->foreground, f)]; + + { + NSColor *bm_color; + if (!p->cursor_p) + bm_color = ns_lookup_indexed_color(face->foreground, f); + else if (p->overlay_p) + bm_color = ns_lookup_indexed_color(face->background, f); + else + bm_color = f->output_data.ns->cursor_color; + [img setXBMColor: bm_color]; + } + #if defined (NS_IMPL_COCOA) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 [img drawInRect: r fromRect: NSZeroRect