[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The unwarranted scrolling assumption
From: |
Lennart Borgman |
Subject: |
Re: The unwarranted scrolling assumption |
Date: |
Fri, 18 Jun 2010 17:29:40 +0200 |
On Fri, Jun 18, 2010 at 5:22 PM, Stefan Monnier
<address@hidden> wrote:
>>> I already did, and I think that code is correct. Obviously,
>>> clip_changed needs to be set whenever the narrowing changes.
>> Ah, finally. Good.
>> And why do you think that?
>
> because src/buffer.h says:
>
> /* Set nonzero whenever the narrowing is changed in this buffer. */
> int clip_changed;
>
> "clipping" and "narrowing" are the same thing. So, changing the
> narrowing should say that clipping has changed. All it says is
> "narrowing has been changed at some point, don't forget to check it".
> So it's the redisplay's responsability to determine whether narrowing is
> indeed different from what it was during the last redisplay (and
> clip_changed is just a variable that can save us from performing this
> check). If setting clip_changed to 1 in the main loop has some other
> effect than slowing things down, that means we have a bug in redisplay.
Yes, clipping and narrowing is the same things, but clip_changed is
just something the display engine uses to see whether a redisplay is
necessary.
Currently redisplay is mislead by narrow_to_region etc setting
clip_changed to 1. The problem as I understands it is that redisplay
has not saved enough information to know whether the clip_changed
should be reset to 0 after the narrowing routines have set it to 1.
My patch fixes this by letting redisplay have the whole responsibility
for clip_changed. There are of course other ways to do it, but from a
logic point that seems the best and I think it gives much cleaner
code.
- Re: The unwarranted scrolling assumption, (continued)
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/18
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/18
- Re: The unwarranted scrolling assumption, Eli Zaretskii, 2010/06/18
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/18
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/18
- Re: The unwarranted scrolling assumption, Eli Zaretskii, 2010/06/19
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/19
- Re: The unwarranted scrolling assumption, Eli Zaretskii, 2010/06/19
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/19
- Re: The unwarranted scrolling assumption, Stefan Monnier, 2010/06/18
- Re: The unwarranted scrolling assumption,
Lennart Borgman <=
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/18
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/17
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/17
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/17
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/17
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/17
- Re: The unwarranted scrolling assumption, Eli Zaretskii, 2010/06/18
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/18
- Re: The unwarranted scrolling assumption, Eli Zaretskii, 2010/06/19
- Re: The unwarranted scrolling assumption, Lennart Borgman, 2010/06/19