Skip to content

Commit

Permalink
window: Refactor print-status.
Browse files Browse the repository at this point in the history
  • Loading branch information
aadcg committed Sep 7, 2023
1 parent fcc84f6 commit 2b99c9c
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/window.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,9 @@ The handlers take the window as argument."))
(setf (slot-value window 'active-buffer) buffer))

(defun print-status (&optional (window (current-window)))
(when (and window (status-buffer window))
(ffi-print-status
window
(format-status (status-buffer window)))))
(with-slots (status-buffer) window
(when (and window status-buffer)
(ffi-print-status window (format-status status-buffer)))))

(hooks:define-hook-type window (function (window))
"Hook acting on `window's.")
Expand Down

0 comments on commit 2b99c9c

Please sign in to comment.