[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering
From: |
Stefan Monnier |
Subject: |
Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3 |
Date: |
Fri, 10 Apr 2020 13:46:22 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> When the last repetition is executed, the behavior seems fine already if the
> value is 0. What I see is "flickering" during scrolling, while C-v is still
> pressed.
Hmmm... I don't know why you see "flickering" during the scrolling, indeed.
And I'm surprised you don't see "flickering" on the last repetition: the
way jit-lock-defer-time works, when input-pending-p is non-nil, jit-lock
marks the chunk as fontified (which is a lie), and this chunk will
always go past `window-end`, so on the last repetition the beginning of
the window is not passed to jit-lock at all (because it was part of the
last chunk of the previous call to jit-lock, with input-pending = true),
and it only gets fontified a bit later via the timer.
That's one of the main advantages of the way
`fast-but-imprecise-scrolling` works: it doesn't lie about having
fontified that chunk.
Along the lines of what you proposed, I just tried the patch below,
which is a bit like (setq jit-lock-defer-mode 0) but without the idle timer.
It's not quite right either, tho (e.g. `emacs -Q src/xdisp.c` fails to font-lock
the initial window, tho it does get font-locked as soon as I move the
cursor).
Stefan
diff --git a/src/xdisp.c b/src/xdisp.c
index 193cc372b0..230e8e2182 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -4097,6 +4097,7 @@ handle_fontified_prop (struct it *it)
{
Lisp_Object prop, pos;
enum prop_handled handled = HANDLED_NORMALLY;
+ extern bool input_was_pending;
if (!NILP (Vmemory_full))
return handled;
@@ -4108,6 +4109,7 @@ handle_fontified_prop (struct it *it)
if (!STRINGP (it->string)
&& it->s == NULL
&& !NILP (Vfontification_functions)
+ && !input_was_pending
&& !NILP (Vrun_hooks)
&& (pos = make_fixnum (IT_CHARPOS (*it)),
prop = Fget_char_property (pos, Qfontified, Qnil),
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, (continued)
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Stefan Monnier, 2020/04/09
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/09
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Stefan Monnier, 2020/04/09
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/09
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Stefan Monnier, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3,
Stefan Monnier <=
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/11
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Stefan Monnier, 2020/04/11
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/11
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Stefan Monnier, 2020/04/12
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/15
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/10
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Eli Zaretskii, 2020/04/11
- Re: Scrolling commands and skipping redisplay, was: Re: emacs rendering comparisson between emacs23 and emacs26.3, Dmitry Gutov, 2020/04/11