GNU bug report logs -
#22404
25.1.50; Forcing `window-scroll-functions` to run.
Previous Next
Full log
View this message in rfc822 format
> Date: Mon, 01 Feb 2016 05:18:02 -0800
> From: Keith David Bershatsky <esq <at> lawlist.com>
> Cc: 22404 <at> debbugs.gnu.org
>
> The four (4) values that I am most interested in are:
>
> 1. window-start
>
> 2. window-end
>
> 3. Point at the beginning of the line containing window-start.
>
> 4. Point at the end of the line containing window-end.
These are available from Lisp, so there seems to be no need to pass
them as arguments to the hook, right?
> Although my proposed usage of the `post-redisplay-hook` will not be to alter buffer (i.e., I'm just adding overlays), other people who may use this new hook in the future may be modifying the buffer content -- e.g., adding/removing fonts, adding/removing text, moving the cursor, etc.
If those users need this new hook, they can always invoke redisplay
explicitly at the end of their code, right?
> The `window-scroll-functions` hook is strategically placed at three locations of `xdisp.c`, and some of those areas are revisited when things have changed since the first pass -- e.g., continuation line at the beginning of the window, or cursor is partially visible at the bottom of the window.
But the fact they run in the middle of the redisplay cycle is exactly
the source of the problems we are trying to solve!
> If the `post-redisplay-hook` runs too late in time to receive any checks regarding cursor position and so forth, some users may be surprised when their cursor ends up below the visible screen at the conclusion of redisplay -- e.g., because they added text or increased a font size that pushed the cursor further down below.
Calling redisplay explicitly should resolve all those issues.
This bug report was last modified 9 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.