emacs-devel
[Top][All Lists]
Advanced

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

Re: comint-preoutput-filter-functions and flickering redisplay in TTY


From: Mario Lang
Subject: Re: comint-preoutput-filter-functions and flickering redisplay in TTY
Date: Tue, 03 Jun 2014 15:12:41 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux)

Nicolas Richard <address@hidden> writes:

> Mario Lang <address@hidden> writes:
>> To reproduce: Install chess.el, call M-x chess-ics RET, login to
>> freechess.org (as guest is OK), and wait a bit.  Your screen (at least in 
>> -nw mode)
>> should start to flicker noticeably every once in a while.
>>
>> Any ideas why?
>
> I tried it in my GUI emacs (just to try chess.el, in fact) and noticed
> very frequent recentering of my window, even when not in the *chess-ics*
> buffer.
>
> By tracing "recenter" I found that tabulated-list-print calls (recenter)
> without checking what the selected window is. 
>
> here's the patch I applied, perhaps you can try it out and see if it
> fixes the problem for you.

Very good catch!  Most of the flickering is now gone.
I think this should be committed, if others are fine with it as well.

> diff --git a/lisp/emacs-lisp/tabulated-list.el 
> b/lisp/emacs-lisp/tabulated-list.el
> index d0d71dd..dd1166f 100644
> --- a/lisp/emacs-lisp/tabulated-list.el
> +++ b/lisp/emacs-lisp/tabulated-list.el
> @@ -323,7 +323,9 @@ to the entry with the same ID element as the current 
> line."
>      (if saved-pt
>       (progn (goto-char saved-pt)
>              (move-to-column saved-col)
> -            (recenter))
> +            (when (eq (window-buffer (selected-window))
> +                         (current-buffer))
> +                 (recenter)))
>        (goto-char (point-min)))))
>
>  (defun tabulated-list-print-entry (id cols)

-- 
CYa,
  ⡍⠁⠗⠊⠕



reply via email to

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