From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Test to determine character left-overhangs a tab stretch.
Date: Tue, 13 Nov 2018 12:57:08 -0800 [thread overview]
Message-ID: <m2o9as66hn.wl%esq@lawlist.com> (raw)
Thank you Eli for helping out with this particular issue. I think the problem is that first_glyph->type (in the following test) is sometimes invalid and that is what causes the crash. The test is designed to skip over the area of code when a tab stretch would normally be drawn anew due to the next glyph having a left overhang.
Last Commit : Tue Nov 13 22:01:57 2018 +0200
: Eli Zaretskii <eliz@gnu.org>
: 4a5a17507fe1e12ee02c174350edc479fb01ac01
: Fix recent change in fileio.c
diff --git a/src/xdisp.c b/src/xdisp.c
index fa7691c..198a516 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -26841,7 +26841,45 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
prepended must be drawn because the first glyph string
draws over it. */
i = left_overwritten (head);
- if (i >= 0)
+
+
+/* *************************************************************************** */
+/* MULTIPLE CURSORS */
+
+ bool skip_p = false;
+ int beg = i;
+
+ if (hl == DRAW_CURSOR)
+ while (beg < start)
+ {
+ struct glyph *first_glyph = (row)->glyphs[area] + beg;
+ if (first_glyph != NULL
+ && first_glyph->type != NULL)
+ {
+ switch (first_glyph->type)
+ {
+ case CHAR_GLYPH:
+ break;
+ case COMPOSITE_GLYPH:
+ break;
+ case STRETCH_GLYPH:
+ {
+ skip_p = true;
+ break;
+ }
+ case IMAGE_GLYPH:
+ break;
+ }
+ }
+ beg += 1;
+ }
+
+ if (i >= 0
+ && !skip_p)
+
+/* *************************************************************************** */
+
+
{
enum draw_glyphs_face overlap_hl;
next reply other threads:[~2018-11-13 20:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-13 20:57 Keith David Bershatsky [this message]
2018-11-14 15:33 ` Test to determine character left-overhangs a tab stretch Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2018-11-14 18:25 Keith David Bershatsky
2018-11-13 19:11 Keith David Bershatsky
2018-11-13 20:08 ` Eli Zaretskii
2018-11-12 22:22 Keith David Bershatsky
2018-11-12 2:06 Keith David Bershatsky
2018-11-12 16:13 ` Eli Zaretskii
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2o9as66hn.wl%esq@lawlist.com \
--to=esq@lawlist.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).