all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Keith David Bershatsky <esq@lawlist.com>
Cc: emacs-devel@gnu.org
Subject: Re: How to calculate X when dealing with truncate-lines non-nil.
Date: Fri, 29 Sep 2017 19:13:39 +0300	[thread overview]
Message-ID: <83r2up7aa4.fsf@gnu.org> (raw)
In-Reply-To: <m2fub7pl6s.wl%esq@lawlist.com> (message from Keith David Bershatsky on Wed, 27 Sep 2017 20:16:11 -0700)

> Date: Wed, 27 Sep 2017 20:16:11 -0700
> From: Keith David Bershatsky <esq@lawlist.com>
> 
> 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.



  reply	other threads:[~2017-09-29 16:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28  3:16 How to calculate X when dealing with truncate-lines non-nil Keith David Bershatsky
2017-09-29 16:13 ` Eli Zaretskii [this message]
  -- strict thread matches above, loose matches on Subject: below --
2017-09-28 17:31 Keith David Bershatsky
2017-09-29 16:25 ` Eli Zaretskii
2017-09-30 16:32 Keith David Bershatsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83r2up7aa4.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=esq@lawlist.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.