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

From: Eli Zaretskii <[email-masked]>
Date: Fri, 10 Jul 2015 22:31:35 +0300

> From: Michael Heerdegen <[email-masked]>
> Cc: [email-masked]
> Date: Fri, 10 Jul 2015 21:19:18 +0200
> 
> > Finally, portions of line-move-visual and its subroutines only work
> > when the line is visible in some window, so won't that again hit the
> > same limitation of posn-at-point?
> 
> I don't know.  That's why the last sentences in my message were
> questions.
> 
> But are you sure that `vertical-motion' does not hit that limitation?

vertical-motion needs the buffer displayed in some window, but it does
not need the text it traversed to be visible in that window.  Thus, it
has fewer limitations that posn-at-point and pos-visible-in-window-p,
which are called by line-move-visual.

> For example, AFAIK `vertical-motion' stops at the end of a visual line
> if the first arg is a cons cell with COLS larger than available cols in
> the line.

Yes.

> How does that work when that line is not displayed somewhere?

It simulates display, i.e. runs the same code as would be used to lay
out the text in question, but without actually displaying it.

It should be possible, in principle, to write something similar to
posn-at-point that would not depend on the text being visible, or
rewrite posn-at-point to free it from this limitation, but we don't
have such a function at this time.  Maybe we should.