all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Emacs Devel <emacs-devel@gnu.org>
Subject: How to calculate X when dealing with truncate-lines non-nil.
Date: Wed, 27 Sep 2017 20:16:11 -0700	[thread overview]
Message-ID: <m2fub7pl6s.wl%esq@lawlist.com> (raw)

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?

[Everything works as expected when truncate-lines is nil.]

Thanks,

Keith



             reply	other threads:[~2017-09-28  3:16 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28  3:16 Keith David Bershatsky [this message]
2017-09-29 16:13 ` How to calculate X when dealing with truncate-lines non-nil Eli Zaretskii
  -- 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=m2fub7pl6s.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=emacs-devel@gnu.org \
    /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.