emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 6fc36b5 210/272: option to add newline after ivy-read prom


From: Oleh Krehel
Subject: [elpa] master 6fc36b5 210/272: option to add newline after ivy-read prompt
Date: Mon, 25 Apr 2016 10:13:26 +0000

branch: master
commit 6fc36b5aa72d8f2e1ec4727c6bbd498168a31732
Author: Eric Danan <address@hidden>
Commit: Eric Danan <address@hidden>

    option to add newline after ivy-read prompt
---
 ivy.el |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ivy.el b/ivy.el
index f11543a..bd5e276 100644
--- a/ivy.el
+++ b/ivy.el
@@ -124,6 +124,10 @@ Set this to \"(%d/%d) \" to display both the index and the 
count."
           (const :tag "Count matches and show current match" "(%d/%d) ")
           string))
 
+(defcustom ivy-add-newline-after-prompt nil
+  "When non-nil, add a newline after the `ivy-read' prompt."
+  :type 'boolean)
+
 (defcustom ivy-wrap nil
   "When non-nil, wrap around after the first and the last candidate."
   :type 'boolean)
@@ -1856,6 +1860,8 @@ depending on the number of candidates."
                  (window-width))
               (setq n-str (concat n-str "\n" d-str))
             (setq n-str (concat n-str d-str)))
+          (when ivy-add-newline-after-prompt
+            (setq n-str (concat n-str "\n")))
           (let ((regex (format "\\([^\n]\\{%d\\}\\)[^\n]" (window-width))))
             (while (string-match regex n-str)
               (setq n-str (replace-match (concat (match-string 1 n-str) "\n") 
nil t n-str 1))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]