all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Paul Eggert <eggert@cs.ucla.edu>
To: Frank Terbeck <ft@bewatermyfriend.org>
Cc: 37671@debbugs.gnu.org
Subject: bug#37671: 27.0.50; Segmentation fault with --fg-daemon on Linux
Date: Thu, 10 Oct 2019 13:56:46 -0700	[thread overview]
Message-ID: <3a76d861-9e15-4aa7-037e-ecaf748d054d@cs.ucla.edu> (raw)
In-Reply-To: <87mueavg1g.fsf@ft.bewatermyfriend.org>

[-- Attachment #1: Type: text/plain, Size: 244 bytes --]

As a shot in the dark, does the attached patch fix things for you, or 
affect the symptoms? The idea is to prevent a reset hlinfo from looking 
like it's nonempty. (A fancier possibility would be to add one to 
end_row and end_col everywhere.)

[-- Attachment #2: emacs.patch --]
[-- Type: text/x-patch, Size: 2148 bytes --]

diff --git a/src/dispextern.h b/src/dispextern.h
index 7a15e2745b..19f2d3ba6c 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -2840,7 +2840,7 @@ #define PRODUCE_GLYPHS(IT)                              \
 reset_mouse_highlight (Mouse_HLInfo *hlinfo)
 {
 
-    hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
+    hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = 0;
     hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
     hlinfo->mouse_face_mouse_x = hlinfo->mouse_face_mouse_y = 0;
     hlinfo->mouse_face_beg_x = hlinfo->mouse_face_end_x = 0;
diff --git a/src/dispnew.c b/src/dispnew.c
index 4dd5ee2a1e..53906d86f6 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -3757,7 +3757,7 @@ gui_update_window_end (struct window *w, bool cursor_on_p,
     {
       Mouse_HLInfo *hlinfo = MOUSE_HL_INFO (f);
 
-      hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
+      hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = 0;
       hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
       hlinfo->mouse_face_window = Qnil;
     }
diff --git a/src/xdisp.c b/src/xdisp.c
index 893ce9269c..92f35a8333 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -28304,8 +28304,7 @@ draw_glyphs (struct window *w, int x, struct glyph_row *row,
       /* If mouse highlighting is on, we may need to draw adjacent
 	 glyphs using mouse-face highlighting.  */
       if (area == TEXT_AREA && row->mouse_face_p
-	  && hlinfo->mouse_face_beg_row >= 0
-	  && hlinfo->mouse_face_end_row >= 0)
+	  && hlinfo->mouse_face_beg_row <= hlinfo->mouse_face_end_row)
 	{
 	  ptrdiff_t row_vpos = MATRIX_ROW_VPOS (row, w->current_matrix);
 
@@ -31512,7 +31511,7 @@ clear_mouse_face (Mouse_HLInfo *hlinfo)
     = !hlinfo->mouse_face_hidden && !NILP (hlinfo->mouse_face_window);
   if (cleared)
     show_mouse_face (hlinfo, DRAW_NORMAL_TEXT);
-  hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = -1;
+  hlinfo->mouse_face_beg_row = hlinfo->mouse_face_beg_col = 0;
   hlinfo->mouse_face_end_row = hlinfo->mouse_face_end_col = -1;
   hlinfo->mouse_face_window = Qnil;
   hlinfo->mouse_face_overlay = Qnil;

  parent reply	other threads:[~2019-10-10 20:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09  1:55 bug#37671: 27.0.50; Segmentation fault with --fg-daemon on Linux Frank Terbeck
2019-10-10 11:03 ` Eli Zaretskii
2019-10-10 18:27   ` Frank Terbeck
2020-01-08  3:23     ` Frank Terbeck
2020-01-08 16:28       ` Eli Zaretskii
2020-01-08 16:39         ` Frank Terbeck
2020-02-01  2:28           ` Frank Terbeck
2020-02-01  8:33             ` Eli Zaretskii
2020-02-01  2:43           ` Frank Terbeck
2020-02-01  8:46             ` Eli Zaretskii
2020-02-01 11:28               ` Frank Terbeck
2020-02-01 12:04                 ` Eli Zaretskii
2020-02-01 12:49                   ` Frank Terbeck
2020-02-01 13:08                     ` Eli Zaretskii
2020-02-01 14:32                       ` Frank Terbeck
2020-02-15  8:28                         ` Eli Zaretskii
2020-02-15 11:32                           ` Frank Terbeck
2020-03-05  7:19                             ` Eli Zaretskii
2020-03-06  0:09                               ` Frank Terbeck
2020-03-06  7:51                                 ` Eli Zaretskii
2019-10-10 20:56 ` Paul Eggert [this message]
2019-10-11  7:02   ` 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3a76d861-9e15-4aa7-037e-ecaf748d054d@cs.ucla.edu \
    --to=eggert@cs.ucla.edu \
    --cc=37671@debbugs.gnu.org \
    --cc=ft@bewatermyfriend.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 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.