From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: 51653@debbugs.gnu.org
Subject: bug#51653: [PATCH] Fix dumping stretch glyph when drawing s->next in NS port
Date: Sun, 07 Nov 2021 16:00:52 +0800 [thread overview]
Message-ID: <871r3swg23.fsf@yahoo.com> (raw)
In-Reply-To: 871r3swg23.fsf.ref@yahoo.com
[-- Attachment #1: Type: text/plain, Size: 123 bytes --]
Otherwise, scrolling in a document with stretch glyphs can cause them to
overwrite parts of the mode line, in some cases.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Set-clipping-when-dumping-stretch-glyphs-in-some-cas.patch --]
[-- Type: text/x-patch, Size: 1257 bytes --]
From 6a2449af61a6be75bd4d0945b8009320745b5ff2 Mon Sep 17 00:00:00 2001
From: Po Lu <luangruo@yahoo.com>
Date: Sun, 7 Nov 2021 15:58:11 +0800
Subject: [PATCH] Set clipping when dumping stretch glyphs in some cases
* src/nsterm.m (ns_draw_glyph_string): Always focus even when dumping
stretch glyphs in s->next.
---
src/nsterm.m | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/nsterm.m b/src/nsterm.m
index a63883cd08..4e84e130b8 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3991,17 +3991,17 @@ Function modeled after x_draw_glyph_string_box ().
width += next->width, next = next->next)
if (next->first_glyph->type != IMAGE_GLYPH)
{
+ n = ns_get_glyph_string_clip_rect (s->next, r);
+ ns_focus (s->f, r, n);
if (next->first_glyph->type != STRETCH_GLYPH)
{
- n = ns_get_glyph_string_clip_rect (s->next, r);
- ns_focus (s->f, r, n);
ns_maybe_dumpglyphs_background (s->next, 1);
- ns_unfocus (s->f);
}
else
{
ns_dumpglyphs_stretch (s->next);
}
+ ns_unfocus (s->f);
next->num_clips = 0;
}
}
--
2.31.1
[-- Attachment #3: Type: text/plain, Size: 9 bytes --]
Thanks.
next parent reply other threads:[~2021-11-07 8:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <871r3swg23.fsf.ref@yahoo.com>
2021-11-07 8:00 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2021-11-07 20:43 ` bug#51653: [PATCH] Fix dumping stretch glyph when drawing s->next in NS port Lars Ingebrigtsen
2021-11-07 23:40 ` Alan Third
2021-11-08 0:16 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871r3swg23.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=51653@debbugs.gnu.org \
--cc=luangruo@yahoo.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.