diff --git a/doom-modeline-segments.el b/doom-modeline-segments.el index 55c2a728..61160a24 100644 --- a/doom-modeline-segments.el +++ b/doom-modeline-segments.el @@ -88,13 +88,11 @@ (defvar meow--indicator) (defvar minions-mode-line-lighter) (defvar minions-mode-line-minor-modes-map) -(defvar mlscroll-minimum-current-width) (defvar mlscroll-right-align) (defvar mu4e--modeline-item) (defvar mu4e-alert-mode-line) (defvar mu4e-alert-modeline-formatter) (defvar mu4e-modeline-mode) -(defvar nyan-minimum-window-width) (defvar objed--obj-state) (defvar objed--object) (defvar objed-modeline-setup-func) @@ -103,9 +101,7 @@ (defvar phi-search--overlays) (defvar phi-search--selection) (defvar phi-search-mode-line-format) -(defvar poke-line-minimum-window-width) (defvar rcirc-activity) -(defvar sml-modeline-len) (defvar symbol-overlay-keywords-alist) (defvar symbol-overlay-temp-symbol) (defvar text-scale-mode-amount) @@ -1625,8 +1621,7 @@ By default, this shows the information specified by `global-mode-string'." (doom-modeline-def-segment buffer-position "The buffer position information." - (let ((visible (doom-modeline--segment-visible 'buffer-position)) - (sep (doom-modeline-spc)) + (let ((sep (doom-modeline-spc)) (wsep (doom-modeline-wspc)) (face (doom-modeline-face)) (help-echo "Buffer percentage\n\ @@ -1660,25 +1655,19 @@ mouse-1: Display Line and Column Mode Menu") ,sep) ;; Position - (,visible - ,(cond - ((and (bound-and-true-p nyan-mode) - (>= (window-width) nyan-minimum-window-width)) - (concat sep (nyan-create) sep)) - ((and (bound-and-true-p poke-line-mode) - (>= (window-width) poke-line-minimum-window-width)) - (concat sep (poke-line-create) sep)) - ((and (bound-and-true-p mlscroll-mode) - (>= (window-width) mlscroll-minimum-current-width)) - (concat - sep - (let ((mlscroll-right-align nil)) - (format-mode-line (mlscroll-mode-line))) - sep)) - ((and (bound-and-true-p sml-modeline-mode) - (>= (window-width) sml-modeline-len)) - (concat sep (sml-modeline-create) sep)) - (t ""))) + ,(cond + ((bound-and-true-p nyan-mode) + (concat sep (nyan-create) sep)) + ((bound-and-true-p poke-line-mode) + (concat sep (poke-line-create) sep)) + ((bound-and-true-p mlscroll-mode) + (concat sep + (let ((mlscroll-right-align nil)) + (format-mode-line (mlscroll-mode-line))) + sep)) + ((bound-and-true-p sml-modeline-mode) + (concat sep (sml-modeline-create) sep)) + (t "")) ;; Percent position (doom-modeline-percent-position