Skip to content

Commit 571b11f

Browse files
committed
fix: Must use frame
1 parent 1be5f38 commit 571b11f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

auto-scroll-bar.el

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,10 @@ Optional argument FRAME is used to select frame's minibuffer."
184184
(auto-scroll-bar--hide-buffer " *Echo Area 0*")
185185
(auto-scroll-bar--hide-buffer " *Echo Area 1*")))
186186

187-
(defun auto-scroll-bar--size-change (&optional _frame &rest _)
187+
(defun auto-scroll-bar--size-change (&optional frame &rest _)
188188
"Show/Hide all visible windows in FRAME."
189189
(elenv-with-no-redisplay
190-
(dolist (win (get-buffer-window-list))
190+
(dolist (win (window-list frame))
191191
(auto-scroll-bar--show-hide win))))
192192

193193
(defun auto-scroll-bar--scroll (&optional window &rest _)
@@ -200,7 +200,8 @@ Optional argument FRAME is used to select frame's minibuffer."
200200
;; The hook `window-scroll-functions' doesn't get called on horizontal scroll.
201201
(defun auto-scroll-bar--post-command (&rest _)
202202
"Hook for post command."
203-
(auto-scroll-bar--scroll (selected-window)))
203+
(elenv-with-no-redisplay
204+
(auto-scroll-bar--show-hide (selected-window))))
204205

205206
(defun auto-scroll-bar--enable ()
206207
"Enable function `auto-scroll-bar-mode'."

0 commit comments

Comments
 (0)