From ec91fc57722cb79cd139824ca098a89640399f88 Mon Sep 17 00:00:00 2001 From: stardiviner Date: Sat, 21 Jan 2017 11:48:40 +0800 Subject: [PATCH] fix (wrong-type-argument wholenump -1) when current indentation is 0 minus 1 will caused wholenump exception. --- eldoc-overlay-mode.el | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/eldoc-overlay-mode.el b/eldoc-overlay-mode.el index 56eaec0..7e0de50 100644 --- a/eldoc-overlay-mode.el +++ b/eldoc-overlay-mode.el @@ -29,7 +29,11 @@ (defun eldoc-overlay--string-display-next-line (string) "Overwrite contents of next line with STRING until next command." - (let* ((indent-spaces (make-string (- (current-indentation) 1) ?\s)) + (let* ((indent-spaces (make-string + (if (= (current-indentation) 0) + (current-indentation) + (- (current-indentation) 1)) + ?\s)) (border-line (make-string (window-body-width) ?―)) (str (concat (propertize border-line 'face 'font-lock-doc-face) "\n" -- 2.11.4.GIT