Subject: bug#23510: Strange redisplay in global highlighted mode moving the scroll bar

From: Eli Zaretskii <[email-masked]>
Date: Wed, 11 May 2016 12:44:43 +0300

> From: Stephen Berman <[email-masked]>
> Cc: "angelo.graziosi\@libero.it" <[email-masked]>,  [email-masked]
> Date: Wed, 11 May 2016 11:25:24 +0200
> 
> What you say about the use of pre- and post-command-hook and moving
> overlays may well be (perhaps the main) part of the problem here, but I
> found out that there's an specific condition inducing it: I noticed that
> the flickering only happens when global-hl-line-mode is enabled, but not
> when hl-line-mode is enabled, and it turns out that the crucial
> difference between them is that in the former,
> global-hl-line-sticky-flag is nil by default, while in the latter,
> hl-line-sticky-flag is t by default: when I set
> global-hl-line-sticky-flag to t and then enable global-hl-line-mode, the
> flickering no longer happens, and when I set hl-line-sticky-flag to nil
> and then enable hl-line-mode, the flickering does happen.

If you can suggest a patch that fixes that and doesn't have any
adverse effects, please do.