From 960f0eb9ab657af85c532574b937d8851049b178 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sun, 17 Oct 2021 21:12:03 +0800 Subject: [PATCH] Fix erasing cursor on top of raised boxes in NS port * src/nsterm.m (ns_draw_relief): Clear top and bottom line areas first, if required. --- src/nsterm.m | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/nsterm.m b/src/nsterm.m index c6f80f8035..007a69ac70 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -3516,6 +3516,12 @@ larger if there are taller display elements (e.g., characters [(raised_p ? lightCol : darkCol) set]; + if (top_p) + { + NSRectFill (NSMakeRect (NSMinX (outer), NSMinY (outer), + NSWidth (outer), hthickness)); + } + if (top_p || left_p) { NSBezierPath *p = [NSBezierPath bezierPath]; @@ -3555,6 +3561,12 @@ larger if there are taller display elements (e.g., characters [p closePath]; [p fill]; } + + if (bottom_p) + { + NSRectFill (NSMakeRect (NSMinX (outer), NSMaxY (inner), + NSWidth (outer), hthickness)); + } } -- 2.31.1