Skip to content

Commit bc53e19

Browse files
committed
Simplify logic
1 parent 1fd8a04 commit bc53e19

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

auto-scroll-bar.el

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,9 +168,9 @@ Optional argument FRAME is used to select frame's minibuffer."
168168

169169
(defun auto-scroll-bar--after-change (&rest _)
170170
"After change hook."
171-
(if (eq (minibuffer-window) (selected-window))
172-
(auto-scroll-bar--hide-minibuffer)
173-
(auto-scroll-bar--scroll (selected-window))))
171+
(when-let ((current (selected-window)))
172+
(if (equal (minibuffer-window) current) (auto-scroll-bar--hide-minibuffer)
173+
(auto-scroll-bar--scroll current))))
174174

175175
(defun auto-scroll-bar--enable ()
176176
"Enable function `auto-scroll-bar-mode'."

0 commit comments

Comments
 (0)