Subject: bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible

From: Eli Zaretskii <[email-masked]>
Date: Thu, 09 Jul 2015 05:38:29 +0300

> From: Michael Heerdegen <[email-masked]>
> Cc: [email-masked]
> Date: Wed, 08 Jul 2015 22:24:21 +0200
> 
> > >   (- (window-pixel-width) (* (frame-fringe-width) 2))
> > > 
> > > is not the available width for text, it is a larger value including
> > > scroll bars etc.
> >
> > Do you understand why the value of frame-fringe-width is multiplied by
> > 2?
> 
> I guess because the window is assumed to have two fringes.

But frame-fringe-width returns the sum of them both, doesn't it?

> > > Probably (/ column (frame-char-width)) can be too large if you are
> > > unlucky.
> >
> > Sorry, I don't follow.  Can you elaborate on when this could happen?
> 
> Note that in the shr-use-fonts -> t case, COLUMN is in pixels.
> 
>   (/ column (frame-char-width))
> 
> is IMO an estimated value of "real" columns to advance.

No, it's the value in pixels expressed in frame's canonical character
width.

> But if there are many wide characters, this can be too large.

No, it cannot.  It doesn't depend in the width of individual
characters, sine it doesn't count real columns.  It's just a
coordinate.

> I think you looked at the wrong `if' branch...?  What I changed was to
> use `end-of-visual-line', which I hope is more accurate than
> 
>   (vertical-motion (cons (/ column (frame-char-width)) 0))
> 
> for finding the right point for breaking the line.

Maybe, it sounds like I need to take a better look.

Thanks.