[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#22404: 25.1.50; Forcing `window-scroll-functions` to run.

From: Keith David Bershatsky
Subject: bug#22404: 25.1.50; Forcing `window-scroll-functions` to run.
Date: Mon, 01 Feb 2016 05:18:02 -0800

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.

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.  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.

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.



At Mon, 01 Feb 2016 21:54:42 +0200,
Eli Zaretskii wrote:
> * * *
> I'd prefer to have a post-redisplay-hook, which is called either at
> the end of redisplay cycle, or after redisplay_internal returns to its
> caller.  Would that solve your problem, and if so, what information do
> you need to be passed to such a hook?

reply via email to

[Prev in Thread] Current Thread [Next in Thread]