Skip to content

Commit

Permalink
Keep both position indicator and percent position.
Browse files Browse the repository at this point in the history
Close #488.
  • Loading branch information
seagle0128 committed Nov 6, 2021
1 parent 25e81e7 commit 79dc0ca
Showing 1 changed file with 14 additions and 9 deletions.
23 changes: 14 additions & 9 deletions doom-modeline-segments.el
Original file line number Diff line number Diff line change
Expand Up @@ -1668,13 +1668,15 @@ See `mode-line-percent-position'.")
(doom-modeline-spc)
(doom-modeline-spc)

;; Line and column
(propertize (format-mode-line lc)
'face face
'help-echo "Buffer position\n\
mouse-1: Display Line and Column Mode Menu"
'mouse-face mouse-face
'local-map local-map)

;; Position
(cond ((and active
(bound-and-true-p nyan-mode)
(not doom-modeline--limited-width-p)
Expand Down Expand Up @@ -1708,16 +1710,19 @@ mouse-1: Display Line and Column Mode Menu"
(doom-modeline-spc)
(doom-modeline-spc)
(propertize (sml-modeline-create) 'mouse-face mouse-face)))
(t
(when doom-modeline-percent-position
(concat
(doom-modeline-spc)
(propertize (format-mode-line '("" doom-modeline-percent-position "%%"))
'face face
'help-echo "Buffer percentage\n\
(t ""))

;; Percent position
(when doom-modeline-percent-position
(concat
(doom-modeline-spc)
(propertize (format-mode-line '("" doom-modeline-percent-position "%%"))
'face face
'help-echo "Buffer percentage\n\
mouse-1: Display Line and Column Mode Menu"
'mouse-face mouse-face
'local-map local-map)))))
'mouse-face mouse-face
'local-map local-map)))

(when (or line-number-mode column-number-mode doom-modeline-percent-position)
(doom-modeline-spc)))))

Expand Down

0 comments on commit 79dc0ca

Please sign in to comment.