Show :All if full buffer is visible
This commit is contained in:
parent
d23f975b25
commit
1d4fea774d
1 changed files with 10 additions and 4 deletions
|
@ -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")
|
||||
(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))))
|
||||
(t (format ":%d%%%%" perc))))))
|
||||
:tight-right t)
|
||||
|
||||
(spaceline-define-segment narf-vc
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue