[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible
From: |
Michael Heerdegen |
Subject: |
bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible |
Date: |
Fri, 10 Jul 2015 21:19:18 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Eli Zaretskii <eliz@gnu.org> writes:
> > Can't we find the position of the last completely visible char of a
> > line with
> >
> > --8<---------------cut here---------------start------------->8---
> > (save-excursion
> > (let ((truncate-lines nil))
> > (when (line-move-visual +1 t)
> > (backward-char 1))
> > (point)))
> > --8<---------------cut here---------------end--------------->8---
>
> I'd prefer to exchange ideas rather than code that I need to second
> guess. So what's the idea behind this?
>
> Is the idea to turn off truncate-lines and thus avoid partially
> visible characters at end of line?
I thought this is obvious.
> If so, how do you find the last visible character? Doing what you
> suggest above won't work with bidirectional text, where (backward-char
> 1) from the leftmost character of a visual line doesn't necessarily
> put you on the last character of the previous visual line. I think
> you need to let-bind visual-order-cursor-movement to t and invoke
> left-char instead.
Ok.
> Next, line-move-visual will only move to the leftmost character of the
> next line if you are already on the leftmost character of the current
> line, so you'd need to make that happen first. Not hard to do, but
> should be part of the code, or maybe I'm missing something.
I missed that because I always have goal-column -> 0.
> 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?
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. How does that work when that line is not displayed somewhere?
Michael.
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, (continued)
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/09
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/09
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/09
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible,
Michael Heerdegen <=
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/10
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/11
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/11
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/20
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Eli Zaretskii, 2015/07/20
- bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/21
bug#21012: 25.0.50; eww: last char of a line sometimes not fully visible, Michael Heerdegen, 2015/07/08