]> code.delx.au - gnu-emacs-elpa/commitdiff
lv.el (lv-message): Use `lv-use-separator'
authorOleh Krehel <ohwoeowho@gmail.com>
Tue, 28 Apr 2015 07:50:10 +0000 (09:50 +0200)
committerOleh Krehel <ohwoeowho@gmail.com>
Tue, 28 Apr 2015 07:50:10 +0000 (09:50 +0200)
* lv.el (lv-message): Check `lv-use-separator' and use `looking-back'.

Fixes #123.

lv.el

diff --git a/lv.el b/lv.el
index 406ecbfae4454e3f5dc4548edf0f0351573051ba..f03e73bec3380694d12277bc42cd7cbbd364dca3 100644 (file)
--- a/lv.el
+++ b/lv.el
@@ -88,8 +88,8 @@ Only the background color is significant."
                    (null lv-force-update))
         (delete-region (point-min) (point-max))
         (insert str)
-        (when (window-system)
-          (unless (string-match-p "\n$" str)
+        (when (and (window-system) lv-use-separator)
+          (unless (looking-back "\n" nil)
             (insert "\n"))
           (insert
            (propertize "__" 'face 'lv-separator 'display '(space :height (1)))