[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to calculate X when dealing with truncate-lines non-nil.
From: |
Eli Zaretskii |
Subject: |
Re: How to calculate X when dealing with truncate-lines non-nil. |
Date: |
Fri, 29 Sep 2017 19:13:39 +0300 |
> Date: Wed, 27 Sep 2017 20:16:11 -0700
> From: Keith David Bershatsky <address@hidden>
>
> In developing my own feature requests to draw crosshairs (#17684) using
> multiple fake cursors (#22873), I have reached a roadblock in understanding
> why
>
> move_it_to (&it, PT, it.last_visible_x, it.last_visible_y - 1, -1,
> MOVE_TO_POS | MOVE_TO_X | MOVE_TO_Y);
>
> is giving me an it.current_x of non-existent coordinates to the imaginary
> right of the visible window when truncate-lines is non-nil.
>
> For example, my screen is 1920 x 1080. When PT is somewhere to the right of
> the initial visible window, I'm getting X coordinates to a tune of 8,000 and
> so forth.
>
> How can I obtain the correct X, Y, HPOS, VPOS when dealing with a non-nil
> truncate-lines situation?
You didn't show enough of your code to answer the question. Please
show everything from the call to init_iterator or start_display to the
above call to move_it_to.