GNU bug report logs - #29002
it.first_visible_x is erroneously 0 while horizontal scrolling.

Previous Next

Package: emacs;

Reported by: Keith David Bershatsky <esq <at> lawlist.com>

Date: Thu, 26 Oct 2017 01:04:02 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: 29002 <at> debbugs.gnu.org, esq <at> lawlist.com
Subject: bug#29002: it.first_visible_x is erroneously 0 while horizontal	scrolling.
Date: Thu, 26 Oct 2017 07:51:55 +0300
On October 26, 2017 6:45:57 AM GMT+03:00, Keith David Bershatsky <esq <at> lawlist.com> wrote:
> Here is a link to a screen-shot depicting #29002:
> 
> https://www.lawlist.com/images/bug_hscl.png

This is not a bug; your expectations are incorrect.  To see why, modify your
recipe to omit the "scroll right" part (step 5).  You will see that bug-hscroll
reports zero.

When hscrolling only the current line, first_visible_x is set to zero, to
reflect the situation for the non-current lines, which are normally not
hscrolled.  However, if you invoke scroll-right, the non-current lines
become hscrolled, so you see a non-zero value of first_visible_x.
In addition, the manual hscroll temporarily disables auto-hscrolling,
and moving cursor re-enables it, which is why gou see the value
reset to zero.

Yes, it's complicated...

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.




This bug report was last modified 7 years and 291 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.