emacs-devel
[Top][All Lists]
Advanced

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

Re: Suggestion: A fringe indicator that shows the last/first line before


From: Stefan Monnier
Subject: Re: Suggestion: A fringe indicator that shows the last/first line before scrolling
Date: Thu, 28 Feb 2008 23:33:40 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

>> It's neither.  It's just the result of how the code is written: there's
>> only one command (the mouse-drag) which happens to read several
>> events  waiting for the event that marks the end of the drag.

> What events actually terminate the drag ?  Martin said it was in

That is yet-another-problem due to the way the code is written.
Actually this part of the mouse-drag is really ugly.  When the drag
ends, the command doesn't end: it waits for the next event (i.e. the
next command).  This is because it want to know if the next event is one
of mouse-region-delete-keys.

I hope we can get rid of this madness at some point.  E.g. by (re)using
the delete-selection-code for this feature.

>> There are other cases where scrolling can happen without running
>> post-command-hook, e.g. scrolling triggered by process filters
>> (e.g. scrolling in the *compilation* buffer or in tail-mode buffers).

> Fair enough - means post-command-hook is a nonstarter like it was for
> point movements.

Not really.  It just means it will only work 99%.
For a more reliable result you'll probably want/need to hack the C code
to introduce some kind of pre-redisplay-hook, since what you're looking
for is linked to the display changes rather than to execution of commands.


        Stefan




reply via email to

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