emacs-devel
[Top][All Lists]
Advanced

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

Re: The unwarranted scrolling assumption


From: Eli Zaretskii
Subject: Re: The unwarranted scrolling assumption
Date: Fri, 18 Jun 2010 17:29:29 +0300

> From: Lennart Borgman <address@hidden>
> Date: Fri, 18 Jun 2010 16:07:17 +0200
> Cc: address@hidden
> 
> On Fri, Jun 18, 2010 at 3:52 PM, Eli Zaretskii <address@hidden> wrote:
> >> From: Lennart Borgman <address@hidden>
> >> Date: Fri, 18 Jun 2010 15:30:37 +0200
> >> Cc: address@hidden
> >>
> >> >> It is !NILP (w->window_end_valid).
> >> >
> >> > ??? How can this be?  The code says:
> >>
> >> A misunderstanding, sorry. I meant that in this case that line/code
> >> gave the value 0.
> >>
> >> >  if (b->clip_changed
> >> >           && !NILP (w->window_end_valid)
> >> >           && w->current_matrix->buffer == b
> >> >           && w->current_matrix->zv == BUF_ZV (b)
> >> >           && w->current_matrix->begv == BUF_BEGV (b))
> >> >    b->clip_changed = 0;
> >
> > So what is the value of w->window_end_valid when you enter
> > reconsider_clip_changes?  Is it nil?
> 
> This is the what I used to get the output I sent:
> 
>   if (b->clip_changed)
>     DebPrint (("+++reconsider: end_valid=%d, b=%d, ZV=%d, BEGV=%d",
>                !NILP (w->window_end_valid),
>                w->current_matrix->buffer == b,
>                w->current_matrix->zv == BUF_ZV (b),
>                w->current_matrix->begv == BUF_BEGV (b)));

And what was the output?  I don't see it in this thread.

> The problem is how clip_changed is handled by narrow_to_region etc.
> That is what my patch is about.

I think your patch is wrong.  I think the current code handles the
case you are trying to "fix" just fine.  It tried to recenter for some
reason, and I'm trying to find out what that reason was.  I'm guessing
that the reason was the window_end_valid flag was nil.  If you confirm
that, we could then start looking for why that flag was nil.  Reusing
the current matrix when that flag is nil is unsafe.

> As I have said several times I think the problem is that clip_changed
> is set by narrow_to_region etc. Please look into this first.

I already did, and I think that code is correct.  Obviously,
clip_changed needs to be set whenever the narrowing changes.




reply via email to

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