summaryrefslogtreecommitdiff
path: root/src/nsterm.m
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2023-04-15 12:43:37 -0400
committerEli Zaretskii <eliz@gnu.org>2023-04-15 12:43:37 -0400
commit5fecdbcd81db3d4a06277400c458d8ca7dcf7462 (patch)
treee8a6e1cca4f6f7642a268575ecf5243347a87ee8 /src/nsterm.m
parent4c086bf2951596d04677c343eb49fb32a3831e18 (diff)
parent5ef7ff05736b9d1b4d806cfe04ec5d99c090e748 (diff)
downloademacs-5fecdbcd81db3d4a06277400c458d8ca7dcf7462.tar.gz
Merge from origin/emacs-29
5ef7ff05736 ; Start a new ChangeLog.4 file. 11126c6d30a Fix 'C-h k' for "Paste from Kill Menu" in context menus 74ddfe811f9 ; * doc/misc/calc.texi (Rewrites Tutorial): Fix a typo (b... 08cda286c3f Improve the documentation of the XDS support 14d1c00e806 Allow reindentation of images inserted by 'mm-inline-image' b63a9eda01c Fix "C-h k" and "C-h c" with Paste from Kill Menu b36c21e27dc Change cursor color on NS port when it matches the face b... 96714c106b7 Improve documentation of image-related commands 6a2863ca016 Fix handling of sliced images 5be79fd05a5 ; * etc/NEWS: Announce 'cyrillic-mongolian' IM. ca1a0fda98a ; Fix last change. ce63462dbda Add cyrillic-mongolian input method 58801792706 ; Minor addition to the Emacs FAQ 88847dee125 Jsonrpc: don't bind inhibit-read-only to t so early cb8c87a423a Allow active region when IM is used # Conflicts: # etc/NEWS
Diffstat (limited to 'src/nsterm.m')
-rw-r--r--src/nsterm.m20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/nsterm.m b/src/nsterm.m
index 87bdb44eadc..ecbf80ff72d 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3750,14 +3750,18 @@ ns_maybe_dumpglyphs_background (struct glyph_string *s, char force_p)
{
struct face *face = s->face;
if (!face->stipple)
- {
- if (s->hl != DRAW_CURSOR)
- [(NS_FACE_BACKGROUND (face) != 0
- ? [NSColor colorWithUnsignedLong:NS_FACE_BACKGROUND (face)]
- : FRAME_BACKGROUND_COLOR (s->f)) set];
- else
- [FRAME_CURSOR_COLOR (s->f) set];
- }
+ {
+ if (s->hl != DRAW_CURSOR)
+ [(NS_FACE_BACKGROUND (face) != 0
+ ? [NSColor colorWithUnsignedLong:NS_FACE_BACKGROUND (face)]
+ : FRAME_BACKGROUND_COLOR (s->f)) set];
+ else if (face && (NS_FACE_BACKGROUND (face)
+ == [(NSColor *) FRAME_CURSOR_COLOR (s->f)
+ unsignedLong]))
+ [[NSColor colorWithUnsignedLong:NS_FACE_FOREGROUND (face)] set];
+ else
+ [FRAME_CURSOR_COLOR (s->f) set];
+ }
else
{
struct ns_display_info *dpyinfo = FRAME_DISPLAY_INFO (s->f);