[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 9b13aa4 170/348: ivy.el (ivy-flip): Allow to flip candidat
From: |
Oleh Krehel |
Subject: |
[elpa] master 9b13aa4 170/348: ivy.el (ivy-flip): Allow to flip candidates/input |
Date: |
Sat, 8 Apr 2017 11:03:49 -0400 (EDT) |
branch: master
commit 9b13aa466e3370b52e536c7c1a290d924d488ee9
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
ivy.el (ivy-flip): Allow to flip candidates/input
* ivy.el (ivy--insert-minibuffer): Update.
Fixes #663
---
ivy.el | 16 ++++++++++++----
1 file changed, 12 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index ed5eed5..575e7af 100644
--- a/ivy.el
+++ b/ivy.el
@@ -2213,6 +2213,11 @@ Should be run via minibuffer `post-command-hook'."
(ivy--filter ivy-text ivy--all-candidates))))
(setq ivy--old-text ivy-text))))
+(defvar ivy-flip (and (require 'lv nil t)
+ nil)
+ "When non-nil, the candidates are above the input, instead of below.
+This depends on `lv' feature provided by the package `hydra'.")
+
(defun ivy--insert-minibuffer (text)
"Insert TEXT into minibuffer with appropriate cleanup."
(let ((resize-mini-windows nil)
@@ -2225,10 +2230,13 @@ Should be run via minibuffer `post-command-hook'."
(ivy--insert-prompt)
;; Do nothing if while-no-input was aborted.
(when (stringp text)
- (let ((buffer-undo-list t))
- (save-excursion
- (forward-line 1)
- (insert text))))
+ (if ivy-flip
+ (let ((lv-force-update t))
+ (lv-message (substring text 1)))
+ (let ((buffer-undo-list t))
+ (save-excursion
+ (forward-line 1)
+ (insert text)))))
(when (display-graphic-p)
(ivy--resize-minibuffer-to-fit))
;; prevent region growing due to text remove/add
- [elpa] master 54c5447 319/348: counsel.el (counsel-grep-function): Add shell-quote-argument, (continued)
- [elpa] master 54c5447 319/348: counsel.el (counsel-grep-function): Add shell-quote-argument, Oleh Krehel, 2017/04/08
- [elpa] master bf8dc5f 326/348: Make swiper-avy work with more regexp builders, Oleh Krehel, 2017/04/08
- [elpa] master 03f90af 324/348: ivy.el (ivy-rotate-sort): Guard against nil sort, Oleh Krehel, 2017/04/08
- [elpa] master ac944ea 325/348: ivy.el: Remove with-ivy-window, Oleh Krehel, 2017/04/08
- [elpa] master 18da759 320/348: ivy.el: Remove ivy--current, Oleh Krehel, 2017/04/08
- [elpa] master 20744aa 337/348: doc/Changelog.org: Prepare for 0.9.0, Oleh Krehel, 2017/04/08
- [elpa] master 13a3f2d 342/348: doc/Changelog.org: Sort stuff, Oleh Krehel, 2017/04/08
- [elpa] master 69dfed9 146/348: counsel.el (counsel-dpkg): Remove typo, Oleh Krehel, 2017/04/08
- [elpa] master 55a90c9 152/348: Make with-ivy-window not necessary in action, Oleh Krehel, 2017/04/08
- [elpa] master 9d693ec 158/348: Use a lighter color for ivy-remote in dark themes, Oleh Krehel, 2017/04/08
- [elpa] master 9b13aa4 170/348: ivy.el (ivy-flip): Allow to flip candidates/input,
Oleh Krehel <=
- [elpa] master 2bc1d7b 276/348: ivy.el (ivy--occur-insert-lines): Scroll to first cand, Oleh Krehel, 2017/04/08
- [elpa] master b1c6cc8 300/348: swiper.el (swiper-all): Fix case-fold-search, Oleh Krehel, 2017/04/08
- [elpa] master c3f5f28 305/348: Add circe-mode to swiper-font-lock-exclude, Oleh Krehel, 2017/04/08
- [elpa] master 7100925 302/348: ivy.el (ivy-completing-read-handlers-alist): New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master b894874 309/348: ivy.el (ivy-occur-grep-mode): Call wgrep-setup if available, Oleh Krehel, 2017/04/08
- [elpa] master 80d3fe3 310/348: Fix compilation warnings, Oleh Krehel, 2017/04/08
- [elpa] master b0ccc7a 312/348: README.md: Recommend enable-recursive-minibuffers, Oleh Krehel, 2017/04/08
- [elpa] master 1ac1cc1 316/348: ivy.el (ivy-completing-read): Don't require-match for null, Oleh Krehel, 2017/04/08
- [elpa] master 7ca301b 334/348: swiper.el (swiper-goto-start-of-match) New defcustom, Oleh Krehel, 2017/04/08
- [elpa] master fc2e198 335/348: swiper.el (swiper--action): Set evil search direction to forward, Oleh Krehel, 2017/04/08