Skip to content

Commit

Permalink
fix: Refill no need to maintain prev buffers
Browse files Browse the repository at this point in the history
  • Loading branch information
jcs090218 committed Jun 19, 2024
1 parent 01e9460 commit e7d322a
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions centaur-tabs-functions.el
Original file line number Diff line number Diff line change
Expand Up @@ -633,18 +633,10 @@ to work. EVT is used to change the active window."
(centaur-tabs-backward--button evt)
(centaur-tabs-forward--button evt))

(defmacro centaur-tabs-save-window-prev-buffers (&rest body)
"Run BODY and leave window preb buffers the same."
(declare (indent 0) (debug t))
`(let ((buffers (window-prev-buffers)))
,@body
(set-window-prev-buffers nil buffers)))

(defun centaur-tabs-refill-tabs ()
"Refill current tab line."
(centaur-tabs-save-window-prev-buffers
(force-window-update (selected-window))
(centaur-tabs--button-ensure-selected-tab-is-visible nil)))
(force-window-update (selected-window))
(centaur-tabs--button-ensure-selected-tab-is-visible nil))

;;
;;; Tabs display
Expand Down

0 comments on commit e7d322a

Please sign in to comment.