Subject: Re: bug#858: Conflict between ERC mode tracking and ibuffer window shrinking

From: [email-masked] (John Paul Wallington)
Date: Thu, 04 Sep 2008 23:48:46 +0100

> Hi,

Hi Antoine,

> I did some testing, and the bug was not in tracker as I suspected, it's in
> scrolltobottom, in erc-goodies.el. This should be much easier for you to
> debug: it's only a few lines long. I strongly suspect the part following
> this comment is responsible :
>       ;; Temporarily bind resize-mini-windows to nil so that users who have
> it
>       ;; set to a non-nil value will not suffer from premature minibuffer
>       ;; shrinkage due to the below recenter call.  I have no idea why this
>       ;; works, but it solves the problem, and has no negative side effects.
>       ;; (Fran Litterio, 2003/01/07)
> 
> Looks like it does have side effects after all :-)

Sorry, I'm having difficulties reproducing the bug.

Could you try getting rid of the code that binds
`resize-mini-windows', perhaps using the function below, and test
whether your suspicion is correct?

(defun erc-scroll-to-bottom (window display-start)
  "Changed to see whether not let binding `resize-mini-windows' to nil
doesn't cause the bug."
  (if (window-live-p window)
      (erc-with-selected-window window
        (save-restriction
          (widen)
          (when (and erc-insert-marker
                     ;; we're editing a line. Scroll.
                     (> (point) erc-insert-marker))
            (save-excursion
              (goto-char (point-max))
              (recenter (or erc-input-line-position -1))
              (sit-for 0)))))))