GNU bug report logs - #23574
24.5; Overzealous underlining in emacs-nox

Previous Next

Package: emacs;

Reported by: Colin Woodbury <cwoodbury <at> azavea.com>

Date: Wed, 18 May 2016 17:11:01 UTC

Severity: normal

Tags: notabug

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


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

From: Eli Zaretskii <eliz <at> gnu.org>
To: martin rudalics <rudalics <at> gmx.at>
Cc: 23574 <at> debbugs.gnu.org, john.b.mastro <at> gmail.com, cwoodbury <at> azavea.com,
 npostavs <at> users.sourceforge.net
Subject: Re: bug#23574: 24.5; Overzealous underlining in emacs-nox
Date: Fri, 10 Jun 2016 17:24:39 +0300
> Date: Fri, 10 Jun 2016 15:59:41 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: npostavs <at> users.sourceforge.net, 23574 <at> debbugs.gnu.org, 
>  john.b.mastro <at> gmail.com, cwoodbury <at> azavea.com
> 
> I meant the time overhead to find each newline (or the character before
> it) in the buffer and put the property on it.

If they decide to do this, they get what they deserve, no?

>  > Yes, a few.  Look at the comments at the beginning of 'struct glyph'
>  > definition in dispextern.h.
> 
> These ones
> 
>        glyph standing for newline at end of line    0
>        empty space after the end of the line       -1
>        overlay arrow on a TTY                      -1
>        ...
> 
> ?

Yes.

>  >> Is there any other way to get the size of the empty space after text
>  >> on each row?
>  >
>  > "Other way"? other than what?
> 
> Other than subtracting the pixel_width from the window text width.  I
> obviously want to just retrieve a calculated value, not recalculate it.

I guess that's the natural way, yes.  Of course, you can only use it
when the display is up to date, otherwise the glyph matrix cannot be
trusted, and you need the move_it_* functions instead.

>  >>   > row->pixel_width is computed in compute_line_metrics,
>  >>   > after the stretch glyph (and any other glyphs needed for line display)
>  >>   > were already inserted.  compute_line_metrics doesn't care about what
>  >>   > glyphs are there, it counts them all.
>  >>
>  >> Hmm... How would I get the width of that stretch glyph then?
>  >
>  > It's recorded in the glyph's pixel_width.
> 
> So for R2L text to get the width of the empty space on the left of a row
> I have to calculate the pixel_width of the leftmost character on that
> row.  Something like the following for a given row?
> 
>    struct glyph *glyph = row->glyphs[TEXT_AREA];
>    width = glyph->pixel_width;

Yes, modulo the usual caveats of hscroll etc.




This bug report was last modified 3 years and 192 days ago.

Previous Next


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