hl-line.el: Don't try to operate on a killed buffer

* lisp/hl-line.el (hl-line-maybe-unhighlight): Examine only
live buffers (bug#25522).
This commit is contained in:
Stephen Berman 2017-01-28 20:49:19 +01:00
parent c7bbddf0ea
commit d12e1ddf42

View file

@ -189,7 +189,8 @@ Specifically, when `hl-line-sticky-flag' is nil deactivate all
such overlays in all buffers except the current one."
(let ((hlob hl-line-overlay-buffer)
(curbuf (current-buffer)))
(when (and (not hl-line-sticky-flag)
(when (and (buffer-live-p hlob)
(not hl-line-sticky-flag)
(not (eq curbuf hlob))
(not (minibufferp)))
(with-current-buffer hlob