Tidy up appearance of anzu and MC segments

This commit is contained in:
Jessie Hildebrandt 2022-12-19 23:38:01 -05:00
parent ef1c752679
commit a4076c7eaa

View File

@ -235,17 +235,16 @@
"Displays color-coded anzu status information in the mode-line (if available)."
(when (and (boundp 'anzu--state) anzu--state)
(cond ((eq anzu--state 'replace-query)
(format #("Replace: %d " 0 11 (face mood-line-status-warning)) anzu--cached-count))
(format #("Replace×%d " 7 10 (face mood-line-status-info)) anzu--cached-count))
(anzu--overflow-p
(format #("%d/%d+ " 0 3 (face mood-line-status-info) 3 6 (face mood-line-status-error)) anzu--current-position anzu--total-matched))
(format #("%d/%d+ " 0 2 (face mood-line-status-info) 3 6 (face mood-line-status-error)) anzu--current-position anzu--total-matched))
(t
(format #("%d/%d " 0 5 (face mood-line-status-info)) anzu--current-position anzu--total-matched)))))
(format #("%d/%d " 0 2 (face mood-line-status-info)) anzu--current-position anzu--total-matched)))))
(defun mood-line-segment-multiple-cursors ()
"Displays the number of active multiple-cursors in the mode-line (if available)."
(when (and (boundp 'multiple-cursors-mode) multiple-cursors-mode)
(concat "MC"
(format #("×%d " 0 3 (face mood-line-status-warning)) (mc/num-cursors)))))
(format #("MC×%d " 2 5 (face mood-line-status-info)) (mc/num-cursors))))
(defun mood-line-segment-position ()
"Displays the current cursor position in the mode-line."