[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master 09cb5c9 025/272: ivy: fix ivy--resize-minibuffer-to-fit fo
From: |
Oleh Krehel |
Subject: |
[elpa] master 09cb5c9 025/272: ivy: fix ivy--resize-minibuffer-to-fit for small delta |
Date: |
Mon, 25 Apr 2016 10:13:14 +0000 |
branch: master
commit 09cb5c9625d5d9f0d7195ed399302d4f224ba086
Author: Felix Lange <address@hidden>
Commit: Felix Lange <address@hidden>
ivy: fix ivy--resize-minibuffer-to-fit for small delta
Very small size increments can be necessary if the initial candidate
list is short (e.g. 3 items) and line-height is set to something other
than zero. In that case, only half of the last line is initially
visible. ivy--resize-minibuffer-to-fit recognizes this and tries to
enlarge the window up the the exact pixel height required, however
window-resize doesn't do anything if the delta is below
frame-char-height.
---
ivy.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/ivy.el b/ivy.el
index 01126d9..16b8d81 100644
--- a/ivy.el
+++ b/ivy.el
@@ -1752,7 +1752,10 @@ Should be run via minibuffer `post-command-hook'."
(let ((text-height (cdr (window-text-pixel-size)))
(body-height (window-body-height nil t)))
(when (> text-height body-height)
- (window-resize nil (- text-height body-height) nil t t)))
+ ;; Note: the size increment needs to be at least frame-char-height,
+ ;; otherwise resizing won't do anything.
+ (let ((delta (max (- text-height body-height)
(frame-char-height))))
+ (window-resize nil delta nil t t))))
(let ((text-height (count-screen-lines))
(body-height (window-body-height)))
(when (> text-height body-height)
- [elpa] master 63be079 009/272: ivy.el (ivy-re-builders-alist): Allow this-command to be a key, (continued)
- [elpa] master 63be079 009/272: ivy.el (ivy-re-builders-alist): Allow this-command to be a key, Oleh Krehel, 2016/04/25
- [elpa] master 09848ca 013/272: Add cousel-ag-base-command var, Oleh Krehel, 2016/04/25
- [elpa] master adfad96 007/272: support imenu, Oleh Krehel, 2016/04/25
- [elpa] master d09a16b 011/272: swiper.el (swiper-font-lock-ensure): Add bongo-playlist-mode, Oleh Krehel, 2016/04/25
- [elpa] master a0f1e25 021/272: ivy.el (ivy-completion-in-region): Fix log 0 issue, Oleh Krehel, 2016/04/25
- [elpa] master df1dc78 019/272: counsel.el (counsel-find-file): Add initial-input, Oleh Krehel, 2016/04/25
- [elpa] master 2ea56ec 027/272: ivy.el (ivy-occur): Fix when ivy--old-re isn't a string, Oleh Krehel, 2016/04/25
- [elpa] master db3e7ff 015/272: Ensure the return result of `ivy-read', Oleh Krehel, 2016/04/25
- [elpa] master e070f4c 022/272: ivy.el (ivy-add-face-text-property): New defun, Oleh Krehel, 2016/04/25
- [elpa] master 89ed4d6 024/272: Improve flx highlighting, Oleh Krehel, 2016/04/25
- [elpa] master 09cb5c9 025/272: ivy: fix ivy--resize-minibuffer-to-fit for small delta,
Oleh Krehel <=
- [elpa] master 6051225 020/272: Call ivy-set-actions with t to affect all commands, Oleh Krehel, 2016/04/25
- [elpa] master 12523d0 023/272: Use flx for highlighting fuzzy matches, Oleh Krehel, 2016/04/25
- [elpa] master 1cd501a 029/272: ivy.el (ivy-completion-in-region): Optimize for 1 cand, Oleh Krehel, 2016/04/25
- [elpa] master 0c844c1 030/272: ivy.el (ivy-completion-in-region): Fix for 1 cand, Oleh Krehel, 2016/04/25
- [elpa] master b5dc239 032/272: counsel.el (counsel--async-sentinel): Fix issue with ivy--regex-ignore-order, Oleh Krehel, 2016/04/25
- [elpa] master b3cd0d5 016/272: ivy.el (ivy-mode): Set completing-read-function, Oleh Krehel, 2016/04/25
- [elpa] master 89ed19e 035/272: ivy.el (ivy--regex-plus): Prettify a bit, Oleh Krehel, 2016/04/25
- [elpa] master 2135752 040/272: counsel.el (counsel--async-filter): Fix up, Oleh Krehel, 2016/04/25
- [elpa] master 426cfcb 028/272: ivy.el (ivy-completion-in-region): Fix a few bugs, Oleh Krehel, 2016/04/25
- [elpa] master a526e86 041/272: Refactor swiper-font-lock-ensure, Oleh Krehel, 2016/04/25