GNU bug report logs -
#17678
24.4.50; Feature Request -- calculate new `window-start` & `window-end` before visual redisplay
Previous Next
Full log
Message #59 received at 17678 <at> debbugs.gnu.org (full text, mbox):
The custom minor-mode that I am working places overlays between `window-start` and `window-end`, and is triggered upon a variety of occurrences. The three general categories that trigger removal / placement of overlays are: (1) buffer modification; (2) window modification; (3) cursor movement. The overlays draw three categories: (1) end of line indicators (e.g., pilcrow, or single-angle [for cursor eol]); (2) a horizontal line at the current cursor position that spans the entire window-width (excluding the line numbers and fringes); and, (3) a vertical line aligned with the cursor stretching from the top to bottom of the window (excluding the headline where I have Tabbar). To make the minor mode as efficient as possible (in terms of time needed to remove / place the overlays), I am limiting the area to only the visible window.
The goal is to have the new overlays placed before the redisplay occurs -- this avoids a brief glimpse of the naked buffer once the prior overlays have been removed (and before the new overlays are laid). Prior to the existence of the `test-mode` that I sent over a short while ago (based on the help that you and Stefan have so graciously provided), I was forcing a redisplay (whenever point moved outside of the *old* visible window limits) in order to obtain the *new* `window-start` and *new* `window-end`. It looks as if the `test-mode` concept will resolve the issue by handling the two different conditions separately -- i.e., point inside the *old* window limits, versus point outside thereof.
---------------------------------------
On Jun 13, 2014, at 1:54 PM, Eli Zaretskii wrote:
>> From: Keith David Bershatsky <esq <at> lawlist.com>
>> Date: Fri, 13 Jun 2014 11:24:01 -0700
>> Cc: 17678 <at> debbugs.gnu.org
>>
>> I believe splitting up the work between the two hooks may be possible -- I will need to revise the conditions once I identify additional situations. As far as I can tell, the `window-scroll-functions` hook is NOT triggered when `point` STAYS between *old* `window-start` and *old* `window-end`. So when `point` STAYS between *old* `window-start` and *old* `window-end`, I will need to use the `post-command-hook`. When point moves BEYOND *old* `window-start` or `*old* `window-end`, then the `window-scroll-functions` hook can take over -- with a forced new `(window-end nil t)`.
>
> Why do you care about the situation where point stays inside the same
> window limits?
This bug report was last modified 11 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.