From a6375eb006aad8b25abf31a25ec29d45c2f69eb7 Mon Sep 17 00:00:00 2001 From: James Nguyen Date: Sat, 9 Dec 2017 13:28:29 -0800 Subject: [PATCH] Make counsel-yank-pop ivy-height configurable --- counsel.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/counsel.el b/counsel.el index f6fe27f9..a0ef9391 100644 --- a/counsel.el +++ b/counsel.el @@ -3133,6 +3133,11 @@ A is the left hand side, B the right hand side." :group 'ivy :type 'string) +(defcustom counsel-yank-pop-height 5 + "The `ivy-height' of `counsel-yank-pop'." + :group 'ivy + :type 'integer) + (defun counsel--yank-pop-format-function (cand-pairs) "Transform CAND-PAIRS into a string for `counsel-yank-pop'." (ivy--format-function-generic @@ -3200,7 +3205,7 @@ selection." ARG preselects the corresponding kill during completion." (interactive "*p") (let ((ivy-format-function #'counsel--yank-pop-format-function) - (ivy-height 5) + (ivy-height counsel-yank-pop-height) (kills (counsel--yank-pop-kills))) (unless kills (error "Kill ring is empty or blank"))