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: David De La Harpe Golden
Subject: Re: Suggestion: A fringe indicator that shows the last/first line before scrolling
Date: Fri, 29 Feb 2008 02:50:24 +0000

On 29/02/2008, Stefan Monnier <address@hidden> wrote:


> 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
mouse-show-mark the problem arises, and it seems that that is called
by mouse-drag-track, and you are deliberately handling scroll-bar
events there - think that means that when the mouse-drag is "almost
over" and mouse-show-mark is happening, the scroll-bar scrolling is
atypically not causing post-command-hooks?

Of course, and I only just noticed this since I usually use transient
mark mode, that post-drag-scrolling mouse-highlight behaviour is also
different depending on whether transient-mark-mode-is on or not - when
it is off, the mouse selected region is still highlighted and
independent of point when scrolling.  I'm not  sure, but that may be
one of the major intents of mouse-show-mark?

Is the call to mouse-show-mark in mouse-drag-track useful when
transient-mark-mode is t?  When I wrap it in an
(unless (eq transient-mark-mode 't) (mouse-show-mark)), I get
perhaps more like naively expected behaviour - ending the mouse drag
(mouse-1-up) causes a post-command-hook, and post-mouse-drag
scroll-bar scrolling causes a post-command-hook.

All pretty irrelevant given below, but anyway.


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




reply via email to

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