emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "... the window start at a meaningless point within a line."


From: Alan Mackenzie
Subject: Re: "... the window start at a meaningless point within a line."
Date: Sun, 18 Oct 2015 15:00:52 +0000
User-agent: Mutt/1.5.23 (2014-03-12)

Hello, Eli.

On Sat, Oct 17, 2015 at 05:22:21PM +0300, Eli Zaretskii wrote:
> > Date: Sat, 17 Oct 2015 16:31:05 +0300
> > From: Eli Zaretskii <address@hidden>
> > Cc: address@hidden
> > 
> > Is the following a correct definition of when Fvertical_motion
> > overshoots, i.e. lands one line below (for LINES > 0) the correct one:
> > when the offset between the "actual" window-start and the preceding
> > "xdisp" BOL is greater than the X coordinate of the last character of
> > the 1st physical line in the window.

> Another idea: did you try augmenting the X coordinate of the iterator
> after it gets back to point at the beginning of Fvertical_motion?
> IOW, after this line:

>       move_it_to (&it,
>                   (!disp_string_at_start_p
>                    || FETCH_BYTE (IT_BYTEPOS (it)) == '\n')
>                   ? PT
>                   : PT - 1,
>                   -1, -1, -1, MOVE_TO_POS);

> modify it.current_x such that it's relative to the "actual"
> window-start.  Then let Fvertical_motion do its job as usual.  Did you
> try that?

No, I haven't.  But I don't think it could work.  After anchoring `it'
at "actual" WS, it would have to move up or down.  Any time the iterator
is moved to a previous line, it re-anchors itself at a previous _xdisp_
BOL then moves forward, losing the relationship with WS.

So this idea might work with nlines > 0, but couldn't work with nlines
<= 0.

-- 
Alan Mackenzie (Nuremberg, Germany).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]