diff options
| author | Alan Third | 2019-07-16 21:32:23 +0100 |
|---|---|---|
| committer | Alan Third | 2019-07-27 18:29:57 +0100 |
| commit | 37db78c4bd351041eada08ebbdbf92c16819f09c (patch) | |
| tree | ba09db9fa15bc88742badb60b2a11972fd9593ae | |
| parent | c26469daa752baf276bcad61b042b218402547de (diff) | |
| download | emacs-37db78c4bd351041eada08ebbdbf92c16819f09c.tar.gz emacs-37db78c4bd351041eada08ebbdbf92c16819f09c.zip | |
Fix stretch glyphs overlap with line above (bug#36633)
* src/nsterm.m (ns_dumpglyphs_stretch): Move overwriting of the
clipping rectangle to after performing clipping.
| -rw-r--r-- | src/nsterm.m | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/nsterm.m b/src/nsterm.m index 02331826d9b..b8754278f04 100644 --- a/src/nsterm.m +++ b/src/nsterm.m | |||
| @@ -3913,10 +3913,13 @@ ns_dumpglyphs_stretch (struct glyph_string *s) | |||
| 3913 | if (!s->background_filled_p) | 3913 | if (!s->background_filled_p) |
| 3914 | { | 3914 | { |
| 3915 | n = ns_get_glyph_string_clip_rect (s, r); | 3915 | n = ns_get_glyph_string_clip_rect (s, r); |
| 3916 | *r = NSMakeRect (s->x, s->y, s->background_width, s->height); | ||
| 3917 | 3916 | ||
| 3918 | if (ns_clip_to_rect (s->f, r, n)) | 3917 | if (ns_clip_to_rect (s->f, r, n)) |
| 3919 | { | 3918 | { |
| 3919 | /* FIXME: Why are we reusing the clipping rectangles? The | ||
| 3920 | other terms don't appear to do anything like this. */ | ||
| 3921 | *r = NSMakeRect (s->x, s->y, s->background_width, s->height); | ||
| 3922 | |||
| 3920 | if (s->hl == DRAW_MOUSE_FACE) | 3923 | if (s->hl == DRAW_MOUSE_FACE) |
| 3921 | { | 3924 | { |
| 3922 | face = FACE_FROM_ID_OR_NULL (s->f, | 3925 | face = FACE_FROM_ID_OR_NULL (s->f, |
| @@ -3951,13 +3954,6 @@ ns_dumpglyphs_stretch (struct glyph_string *s) | |||
| 3951 | r[i].origin.x += leftoverrun; | 3954 | r[i].origin.x += leftoverrun; |
| 3952 | r[i].size.width -= leftoverrun; | 3955 | r[i].size.width -= leftoverrun; |
| 3953 | } | 3956 | } |
| 3954 | |||
| 3955 | /* XXX: Try to work between problem where a stretch glyph on | ||
| 3956 | a partially-visible bottom row will clear part of the | ||
| 3957 | modeline, and another where list-buffers headers and similar | ||
| 3958 | rows erroneously have visible_height set to 0. Not sure | ||
| 3959 | where this is coming from as other terms seem not to show. */ | ||
| 3960 | r[i].size.height = min (s->height, s->row->visible_height); | ||
| 3961 | } | 3957 | } |
| 3962 | 3958 | ||
| 3963 | [bgCol set]; | 3959 | [bgCol set]; |