[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ivy-hydra 82cb9da 272/395: ivy.el (ivy--do-shrink-windo
From: |
Basil L. Contovounesios |
Subject: |
[elpa] externals/ivy-hydra 82cb9da 272/395: ivy.el (ivy--do-shrink-window): Account for the extra prompt height |
Date: |
Thu, 25 Feb 2021 08:32:18 -0500 (EST) |
branch: externals/ivy-hydra
commit 82cb9daa7d75f5d7183382e2817c432b800453ac
Author: Oleh Krehel <ohwoeowho@gmail.com>
Commit: Oleh Krehel <ohwoeowho@gmail.com>
ivy.el (ivy--do-shrink-window): Account for the extra prompt height
Fixes #2501
---
ivy.el | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/ivy.el b/ivy.el
index 1d48ebf..cc1d6d3 100644
--- a/ivy.el
+++ b/ivy.el
@@ -3504,6 +3504,16 @@ height < `ivy-height', auto-shrink the minibuffer."
:key-type symbol
:value-type boolean))
+(defun ivy--do-shrink-window ()
+ (let ((h (save-excursion
+ (goto-char (minibuffer-prompt-end))
+ (let ((inhibit-field-text-motion t))
+ (line-number-at-pos)))))
+ (shrink-window (-
+ (/ (window-body-height nil t)
+ (frame-char-height))
+ ivy--length h))))
+
(defun ivy--resize-minibuffer-to-fit ()
"Resize the minibuffer window size to fit the text in the minibuffer."
(unless (or (frame-root-window-p (minibuffer-window))
@@ -3525,10 +3535,7 @@ height < `ivy-height', auto-shrink the minibuffer."
(ivy-alist-setting
ivy-auto-shrink-minibuffer-alist))
(< ivy--length ivy-height))
- (shrink-window (-
- (/ (window-body-height nil t)
- (frame-char-height))
- ivy--length 1)))))
+ (ivy--do-shrink-window))))
(let ((text-height (count-screen-lines))
(body-height (window-body-height)))
(when (> text-height body-height)
- [elpa] externals/ivy-hydra fc3252b 274/395: Don't insert ^ on aborting completion in region, (continued)
- [elpa] externals/ivy-hydra fc3252b 274/395: Don't insert ^ on aborting completion in region, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra a4a22e0 294/395: ivy.el (ivy-display-style): Remove, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ee747e6 290/395: ivy.el (ivy--update-history): Use ivy-state-current for file names, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f67a2bb 215/395: ivy.el (ivy--filter): Prioritize :matcher, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ca89b5d 236/395: ivy.el (ivy--recompute-index): Don't call ivy-set-index twice, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra bd80852 251/395: Fix punctuation in some error messages, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 8383dd6 248/395: * counsel.el: Unquote lambda actions, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 6916cbd 256/395: doc/ivy.org: Document ivy-insert-current-full, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ace2475 260/395: counsel.el (counsel--sync-sentinel-on-exit): Fix regression, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra f1472ef 266/395: ivy.el: When completing files, make "RET" reverse "DEL", Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 82cb9da 272/395: ivy.el (ivy--do-shrink-window): Account for the extra prompt height,
Basil L. Contovounesios <=
- [elpa] externals/ivy-hydra 6f50fca 286/395: ivy.el: When reading file names, take the non-directory part of :initial-input, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra d452878 291/395: counsel-grep/ag/rg/pt/...: Allow to deplay subprocess creation, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 84dfbf8 296/395: ivy-avy.el: Checkdoc, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 864570a 323/395: ivy.el (ivy--get-multi-action): Fix and add a test, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 05c12fc 310/395: counsel.el (counsel--grep-smart-case-flag): Check if base command is a string, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra b2af619 322/395: ivy.el (ivy--call-marked): Don't call multi-action if non-default action was chosen, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 683a7b7 309/395: ivy.el (ivy-completion-in-region): Fix "^" and C-g, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra ea9bd06 353/395: Encode --pcre switch correctly for ivy-occur, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 63549da 354/395: Fix counsel-descbinds for Emacs 28, Basil L. Contovounesios, 2021/02/25
- [elpa] externals/ivy-hydra 387390b 312/395: Prefer derived-mode-p for major-mode comparisons, Basil L. Contovounesios, 2021/02/25