mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Show :All if full buffer is visible
This commit is contained in:
@ -227,10 +227,16 @@
|
||||
|
||||
(spaceline-define-segment narf-buffer-position
|
||||
"A more vim-like buffer position."
|
||||
(let ((perc (/ (window-end) 0.01 (point-max))))
|
||||
(cond ((eq (window-start) 1) ":Top")
|
||||
((>= perc 100) ":Bot")
|
||||
(t (format ":%d%%%%" perc))))
|
||||
(let ((start (window-start))
|
||||
(end (window-end))
|
||||
(pend (point-max)))
|
||||
(if (and (eq start 1)
|
||||
(eq end pend))
|
||||
":All"
|
||||
(let ((perc (/ end 0.01 pend)))
|
||||
(cond ((eq start 1) ":Top")
|
||||
((>= perc 100) ":Bot")
|
||||
(t (format ":%d%%%%" perc))))))
|
||||
:tight-right t)
|
||||
|
||||
(spaceline-define-segment narf-vc
|
||||
|
Reference in New Issue
Block a user