unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Keith David Bershatsky <esq@lawlist.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 29002@debbugs.gnu.org
Subject: bug#29002: it.first_visible_x is erroneously 0 while horizontal	scrolling.
Date: Wed, 25 Oct 2017 23:20:09 -0700	[thread overview]
Message-ID: <m2d15al9ba.wl%esq@lawlist.com> (raw)
In-Reply-To: <m2h8umbu0k.wl%esq@lawlist.com>

Thank you, Eli, for looking at #29002.

In the screen-shot, line 4 is the current-line and it is hscrolled.

• hscrolling_current_line_p is true.

• w->suspend_auto_hscroll is false.

• w->hscroll > 0.

• All non-current lines are also hscrolled.

• it.first_visible_x == 0.

What would be a good method to programmatically test to see whether all other lines are hscrolled given the above?

As I visit each screen line from top to bottom of the window, I will need to determine whether the line is hscrolled and then try make my way over to a screen relative X coordinate.  move_it_in_display_line_to will need an absolute X.

For example, let's say we are on line 6 in the screen-shot.  How do we know that it is hscrolled?  If we know for sure it is hscrolled, then we can tell move_it_in_display_line_to try and reach (w->hscroll * FRAME_COLUMN_WIDTH (f)) + my_arbitrary_screen_relative_x.

Keith

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DATE:  [10-25-2017 21:51:55] <26 Oct 2017 07:51:55 +0300>
FROM:  Eli Zaretskii <eliz@gnu.org>
> 
>  * * *
> 
> I'm not sure why you expected non-zero values in this case, but if you
> want to identify this situation, use the function
> hscrolling_current_line_p.  Or just calculate the value yourself
> using w->hscroll.





  parent reply	other threads:[~2017-10-26  6:20 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-26  1:03 bug#29002: it.first_visible_x is erroneously 0 while horizontal scrolling Keith David Bershatsky
2017-10-26  3:45 ` Keith David Bershatsky
2017-10-26  4:51   ` Eli Zaretskii
2017-10-26  6:20 ` Keith David Bershatsky [this message]
2017-10-26 15:56   ` Eli Zaretskii
2017-10-26 18:56 ` Keith David Bershatsky
2017-10-29 11:23   ` Eli Zaretskii
2017-10-29 17:29 ` Keith David Bershatsky
2017-10-29 18:29   ` Eli Zaretskii
2017-10-29 18:56     ` Eli Zaretskii
2017-10-29 18:56 ` Keith David Bershatsky
2017-10-29 19:23   ` Eli Zaretskii
2017-10-29 19:08 ` Keith David Bershatsky
2017-10-29 20:12 ` Keith David Bershatsky
2017-10-30 18:02   ` Eli Zaretskii
2017-10-30 19:36 ` Keith David Bershatsky
2017-11-04  9:32   ` Eli Zaretskii
2017-11-05  0:16 ` Keith David Bershatsky
2017-11-05  9:15 ` Keith David Bershatsky
2017-11-05 10:44   ` Eli Zaretskii
2017-11-05 16:59 ` Keith David Bershatsky
2017-11-05 18:12   ` Eli Zaretskii
2017-11-06  1:05 ` 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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m2d15al9ba.wl%esq@lawlist.com \
    --to=esq@lawlist.com \
    --cc=29002@debbugs.gnu.org \
    --cc=eliz@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).