Subject: patch: bug #4831 part 2

From: Will Roberts <[email-masked]>
Date: Fri, 23 Jul 2010 20:45:54 +0200

[ resent from emacs-devel ]

Hello:

This is my first patch submission to Emacs.  I'd be happy to learn how to do it better in the future, if you have any comments or criticism.  The patch was made against the bazaar repository.

Thanks,
Will

== Description: ==

A first draft at patching bug #4831 (23.1.50; cursor problems on Mac OS X), specifically part 2, where characters under the cursor are not seen.

Modified the drawing routines: 
* the cursor will be drawn with the frame foreground color if the cursor color is the same as the current face background color or the frame background color.
* the text over the cursor will be drawn with the frame background color if the cursor is a filled box, and the cursor color is the same as the text color

== Copyright ==

I happily assign copyright for this code to the FSF.  Please do with it what you like.

== src/ChangeLog: ==

2010-07-23  Will Roberts  <[email-masked]>

        * nsfont.m (nsfont_draw): Change the text color if needed to be
        distinct from the cursor color

        * nsterm.m (ns_draw_window_cursor): Change the cursor color to be
        distinct from the text color