[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-explorer a413966 4/4: Pass ivy-display-function com
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ivy-explorer a413966 4/4: Pass ivy-display-function compatible string to message function |
Date: |
Wed, 17 Mar 2021 18:45:01 -0400 (EDT) |
branch: externals/ivy-explorer
commit a413966cfbcecacc082d99297fa1abde0c10d3f3
Author: Clemens Radermacher <clemera@posteo.net>
Commit: Clemens Radermacher <clemera@posteo.net>
Pass ivy-display-function compatible string to message function
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.
---
ivy-explorer.el | 7 ++++---
1 file 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)