emacs-devel
[Top][All Lists]
Advanced

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

Re: Unfreezing the display during auto-repeated scrolling. Simpler appro


From: Stefan Monnier
Subject: Re: Unfreezing the display during auto-repeated scrolling. Simpler approach.
Date: Wed, 29 Oct 2014 12:59:26 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

> Just to be absolutely clear, we're talking about my _simpler_ hack, the
> one that binds fontification-functions to nil during scrolling.  The
> previous complicated one, that messed with "struct it"s, I think we can
> all agree is dead.

Yes.

> An approach I haven't tried yet would be to use the existing scrolling
> functionality for discreet key presses, changing to
> nilled-out-fontification-functions when the keystrokes are coming in at
> auto-repeat rates.

I think the problem is how to distinguish the two.  If we can
distinguish the two, then we could probably use it in jit-lock-defer.

More specifically, your jit-lock-defer experiment showed that the
problem is that to get smooth scrolling, we need to skip fontification
during the scroll even though there's no input pending (because the
next repetition hasn't arrived yet).

Another way to look at it: if running CMD required to run the
fontification functions, then we should not skip the subsequent
redisplay even if there's input pending (this is based on the assumption
that running the fontification functions takes the lion's share of
redisplay time and that running the fontification function during CMD
means that redisplay probably won't need to run the fontification
function).  Such a heuristic might make the
jit-lock-defer-when-input-pending work better.


        Stefan



reply via email to

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