From 072adabf19ef9d5df4675ae0eb645a555f3c2f84 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 9 Dec 2017 17:57:12 +0100 Subject: Fix numerical error on empty buffers --- emacs.d/init.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs.d/init.el b/emacs.d/init.el index 3d475bf..5c60dbe 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -99,7 +99,7 @@ (spaceline-define-segment buffer-position "Buffer position in percent" (format "%3d%%%%" (/ (* 100 (- (line-number-at-pos) 1)) - (count-lines (point-min) (point-max))))) + (max 1 (count-lines (point-min) (point-max)))))) ;;; Variables -- cgit v1.2.1