retitle 51590 follow-mode is broken with header-line and tab-line quit >> The most low-level function of follow-mode is follow-calc-win-end. >> When global-tab-line-mode is enabled, follow-calc-win-end >> returns the same values as when global-tab-line-mode is disabled. > > Can you step through that function and see which part is misbehaving > there? > >> I don't understand what more low-level function doesn't take >> into account the height of the tab-line. Maybe the problem is >> in pos-visible-in-window-p? Or maybe different values returned >> by window-inside-pixel-edges and window-end? > > I don't know the answer, but I see that header-line-format is > mentioned in one place in follow.el, and that is not a good sign... Indeed, I tested with the header-line, and it has the same problem, so retitled this bug report. After trial and error, I arrived to the following patch that completely fixes these problems. However, I can't explain how it works.