summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClemens Radermacher <clemera@posteo.net>2019-09-09 21:21:25 +0200
committerClemens Radermacher <clemera@posteo.net>2019-09-09 21:21:25 +0200
commita413966cfbcecacc082d99297fa1abde0c10d3f3 (patch)
treec1de886d7f5e93e88867ec8293dc7bc13a34f627
parentcb41a9e5df1cfad5877ab5429b9250e7ba082e4e (diff)
Pass ivy-display-function compatible string to message functionexternals/ivy-explorer
Regular ivy-display-functions expect a leading newline for the display string, in order to use those regular display functions as ivy-explorer-message-function pass the column menu with a leading newline, too.
-rw-r--r--ivy-explorer.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/ivy-explorer.el b/ivy-explorer.el
index 72587d2..27e5c49 100644
--- a/ivy-explorer.el
+++ b/ivy-explorer.el
@@ -285,7 +285,8 @@ the menu string as `cdr'."
(defun ivy-explorer--lv-message (str)
"Set ivy explorer window contents to string STR."
- (let* ((n-lines (cl-count ?\n str))
+ (let* ((str (substring str 1))
+ (n-lines (cl-count ?\n str))
(window-size-fixed nil)
deactivate-mark
golden-ratio-mode)
@@ -327,7 +328,7 @@ the menu string as `cdr'."
:string
(with-current-buffer (get-buffer-create " *Minibuf-1*")
(let ((point (point))
- (string (concat (buffer-string) " \n" msg)))
+ (string (concat (buffer-string) " " msg)))
(add-text-properties (- point 1) point '(face (:inherit cursor))
string)
string))
@@ -678,7 +679,7 @@ Call the permanent action if possible.")
(mstring (cdr menu)))
(setq ivy-explorer--col-n mcols)
(setq ivy-explorer--row-n mrows)
- (funcall ivy-explorer-message-function mstring)))
+ (funcall ivy-explorer-message-function (concat "\n" mstring))))
(defun ivy-explorer-read (prompt coll &optional avy msgf mcols width height)