diff options
| author | oldosfan | 2021-10-17 21:12:03 +0800 |
|---|---|---|
| committer | Po Lu | 2021-11-10 13:27:01 +0800 |
| commit | 2b5a2ab50b7817f84ae38f84b4ea36ea38cd5a3b (patch) | |
| tree | c22e5ead0bd3aa08948ce9895fef91f3952bd580 | |
| parent | 346cfc81247e6bf8e727a27b42f44f2389bd1269 (diff) | |
| download | emacs-2b5a2ab50b7817f84ae38f84b4ea36ea38cd5a3b.tar.gz emacs-2b5a2ab50b7817f84ae38f84b4ea36ea38cd5a3b.zip | |
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.
| -rw-r--r-- | src/nsterm.m | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index ed0e7a2aae8..8ee5c03b97e 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -3510,6 +3510,12 @@ ns_draw_relief (NSRect outer, int hthickness, int vthickness, char raised_p, | |||
| 3510 | 3510 | ||
| 3511 | [(raised_p ? lightCol : darkCol) set]; | 3511 | [(raised_p ? lightCol : darkCol) set]; |
| 3512 | 3512 | ||
| 3513 | if (top_p) | ||
| 3514 | { | ||
| 3515 | NSRectFill (NSMakeRect (NSMinX (outer), NSMinY (outer), | ||
| 3516 | NSWidth (outer), hthickness)); | ||
| 3517 | } | ||
| 3518 | |||
| 3513 | if (top_p || left_p) | 3519 | if (top_p || left_p) |
| 3514 | { | 3520 | { |
| 3515 | NSBezierPath *p = [NSBezierPath bezierPath]; | 3521 | NSBezierPath *p = [NSBezierPath bezierPath]; |
| @@ -3549,6 +3555,12 @@ ns_draw_relief (NSRect outer, int hthickness, int vthickness, char raised_p, | |||
| 3549 | [p closePath]; | 3555 | [p closePath]; |
| 3550 | [p fill]; | 3556 | [p fill]; |
| 3551 | } | 3557 | } |
| 3558 | |||
| 3559 | if (bottom_p) | ||
| 3560 | { | ||
| 3561 | NSRectFill (NSMakeRect (NSMinX (outer), NSMaxY (inner), | ||
| 3562 | NSWidth (outer), hthickness)); | ||
| 3563 | } | ||
| 3552 | } | 3564 | } |
| 3553 | 3565 | ||
| 3554 | 3566 | ||