+ (when (and notmuch-hl-line
+ ;; If we know where the cursor will end up (from
+ ;; the call to notmuch-search), avoid redrawing the
+ ;; hl-line overlay until the buffer is sufficiently
+ ;; filled. This check is intended as an
+ ;; optimization to reduce flicker.
+ (>=
+ (line-number-at-pos (point-max) t)
+ (or notmuch-search-target-line -1)))
+ (notmuch-hl-line-mode))