branch: master commit 03ddd52388ab393585acc634ad04832522b67964 Author: Michael Heerdegen <michael_heerde...@web.de> Commit: Michael Heerdegen <michael_heerde...@web.de>
after-scroll: don't remove highlighting when called in succession avoid removing highlighting when `window-scroll-functions' is called multiple times in succession (follow-mode does that) --- on-screen.el | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/on-screen.el b/on-screen.el index f89fcd3..898829d 100644 --- a/on-screen.el +++ b/on-screen.el @@ -458,7 +458,12 @@ This should normally go to `window-scroll-functions'." (overlays (caddr win-data)) (s1 (car area)) (s2 (cadr area))) - (when (and on-screen-auto-update (timerp timer)) + (when (and + on-screen-auto-update + (timerp timer) + ;; avoid removing highlighting when `window-scroll-functions' is + ;; called multiple times in succession (follow-mode does that) + (not (eq (car-safe area) (on-screen-window-start win)))) ;; do what the timer would do, and cancel timer (on-screen-remove-highlighting win) (cancel-timer timer)