GNU bug report logs - #63271
29.0.90; broken mouse-face

Previous Next

Package: emacs;

Reported by: Juri Linkov <juri <at> linkov.net>

Date: Thu, 4 May 2023 15:16:02 UTC

Severity: normal

Found in version 29.0.90

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #71 received at 63271 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Stephen Berman <stephen.berman <at> gmx.net>
Cc: luangruo <at> yahoo.com, 63271 <at> debbugs.gnu.org, juri <at> linkov.net
Subject: Re: bug#63271: 29.0.90; broken mouse-face
Date: Tue, 09 May 2023 13:14:29 +0300
> From: Stephen Berman <stephen.berman <at> gmx.net>
> Cc: Juri Linkov <juri <at> linkov.net>,  luangruo <at> yahoo.com,  63271 <at> debbugs.gnu.org
> Date: Tue, 09 May 2023 11:49:00 +0200
> 
> Here's what I get:
> 
> Thread 1 "emacs" hit Breakpoint 3, show_mouse_face (
>     hlinfo=hlinfo <at> entry=0x555556145870, draw=draw <at> entry=DRAW_MOUSE_FACE)
>     at /home/steve/src/emacs/emacs-29/src/xdisp.c:33519
> 33519		      row->mouse_face_p
> (gdb) pgrow
> TEXT: 6 glyphs
>   0    0: CHAR[ ] pos=146 blev=0,btyp=L w=8 a+d=13+4 MB
>   1    8: CHAR[T] pos=147 blev=0,btyp=L w=8 a+d=13+4 MB
>   2   16: CHAR[O] pos=148 blev=0,btyp=L w=8 a+d=13+4 MB
>   3   24: CHAR[D] pos=149 blev=0,btyp=L w=8 a+d=13+4 MB
>   4   32: CHAR[O] pos=150 blev=0,btyp=L w=8 a+d=13+4 MB
>   5   40: CHAR[ ] pos=0 blev=0,btyp=B w=8 a+d=13+4 MB
> (gdb) continue
> Continuing.
> 
> Thread 1 "emacs" hit Breakpoint 3, show_mouse_face (hlinfo=0x555556145870,
>     draw=draw <at> entry=DRAW_MOUSE_FACE)
>     at /home/steve/src/emacs/emacs-29/src/xdisp.c:33519
> 33519		      row->mouse_face_p
> (gdb) pgrow
> TEXT: 6 glyphs
>   0    0: CHAR[ ] pos=146 blev=0,btyp=L w=8 a+d=13+4 MB
>   1    8: CHAR[T] pos=147 blev=0,btyp=L w=8 a+d=13+4 MB
>   2   16: CHAR[O] pos=148 blev=0,btyp=L w=8 a+d=13+4 MB
>   3   24: CHAR[D] pos=149 blev=0,btyp=L w=8 a+d=13+4 MB
>   4   32: CHAR[O] pos=150 blev=0,btyp=L w=8 a+d=13+4 MB
>   5   40: CHAR[ ] pos=0 blev=0,btyp=B w=8 a+d=13+4 MB

Thanks, so far so good.

Next experiment:

  $ gdb ./emacs
  [...]
  (gdb) break xterm.c:8119
  (gdb) run -Q

The breakpoint is here:

  else if (s->hl == DRAW_MOUSE_FACE)
    {
      x_set_mouse_face_gc (s);  <<<<<<<<<<<<<<<<<<<<<<<<<<<
      s->stippled_p = s->face->stipple != 0;
    }

Once again, inside Emacs disable blink-cursor-mode and
global-eldoc-mode, then evaluate the recipe:

  M-: (insert " " (propertize "TODO" 'face '(:inherit variable-pitch) 'mouse-face 'highlight)) RET

and move the mouse pointer to "TODO".  Each time it breaks, please
type:

  (gdb) print *s
  (gdb) print s->first_glyph - s->row->glyphs[1]

and show the results.  On my system the glyph_string s includes 5
glyphs (s->nchars = 5), and the last command above prints "1", which
means the first glyph of the glyph_string is the second glyph on its
screen line (since the line starts with a SPC character that doesn't
have the mouse-highlight face).




This bug report was last modified 2 years and 8 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.