bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before


From: Eli Zaretskii
Subject: bug#16129: 24.3.50; Emacs slow with follow-mode when buffer ends before last window
Date: Mon, 06 Jan 2014 18:33:02 +0200

> Date: Mon, 6 Jan 2014 09:20:03 +0100
> From: Anders Lindgren <address@hidden>
> Cc: Stefan Monnier <address@hidden>, address@hidden
> 
> I think the incorrect state occurs when the new early exit occurs from
> redsplay_window. When I added the condition "&& PT == w->last_point", both
> the recentering problem and speed issues were solved.

Indeed, this was my conclusion as well.  (Except that PT is not quite
right, as the window could be displaying a buffer that is not the
current one at that early point in redisplay_window.)

What this caused was that the window redisplay was mistakenly skipped,
but then we marked that window's display "accurate", which confused
the heck out of the display engine.

So I installed the patch below to fix this regression, and I'm marking
this bug done.  Feel free to reopen if there are any leftovers.

Btw, I strongly recommend against messing with window-start (or
anything else that potentially requires redisplay) in a
post-command-hook: doing so disables some important redisplay
optimizations, and can easily trigger subtle misfeatures.  I suggest
to look for a better method to do what follow-mode needs to do, even
if that means we'd have to implement a special hook we don't yet have.

Thanks.

=== modified file 'src/xdisp.c'
--- src/xdisp.c 2014-01-01 17:44:48 +0000
+++ src/xdisp.c 2014-01-06 16:21:39 +0000
@@ -15621,7 +15621,8 @@ redisplay_window (Lisp_Object window, bo
       && REDISPLAY_SOME_P ()
       && !w->redisplay
       && !f->redisplay
-      && !buffer->text->redisplay)
+      && !buffer->text->redisplay
+      && BUF_PT (buffer) == w->last_point)
     return;
 
   /* Make sure that both W's markers are valid.  */






reply via email to

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