emacs-diffs
[Top][All Lists]
Advanced

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

feature/icomplete-vertical 3ae232d 20/20: Icomplete improve vertical lin


From: Jimmy Aguilar Mena
Subject: feature/icomplete-vertical 3ae232d 20/20: Icomplete improve vertical lines calculation.
Date: Fri, 18 Sep 2020 13:00:04 -0400 (EDT)

branch: feature/icomplete-vertical
commit 3ae232d923608ca3561385dc587e619e0ac9fcc5
Author: Jimmy Aguilar Mena <spacibba@aol.com>
Commit: Jimmy Aguilar Mena <spacibba@aol.com>

    Icomplete improve vertical lines calculation.
    
    * lisp/icomplete.el (icomplete--vertical-get-max-height) : Use
    frame-char-height instead of line-pixel-height because
    max-mini-window-height refers to the frame's default font height.
---
 lisp/icomplete.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/icomplete.el b/lisp/icomplete.el
index 213fc51..c1c8d8d 100644
--- a/lisp/icomplete.el
+++ b/lisp/icomplete.el
@@ -526,16 +526,16 @@ Conditions are:
     map)
   "Keymap used by `fido-mode' and `icomplete-mode' in 
`icomplete-vertical-mode'.")
 
-(defun icomplete--vertical-get-max-height (line-height)
+(defun icomplete--vertical-get-max-height ()
   (let ((minibuffer-parameter (frame-parameter nil 'minibuffer)))
     (cond
      ((eq minibuffer-parameter t)
       (cond ((floatp max-mini-window-height)
             (floor (* max-mini-window-height (frame-pixel-height))))
            ((integerp max-mini-window-height)
-            (floor (* max-mini-window-height line-height)))
+            (floor (* max-mini-window-height (frame-char-height))))
            (t
-             (* icomplete-prospects-height line-height))))
+             (* icomplete-prospects-height (frame-char-height)))))
      ((eq minibuffer-parameter 'only)
       (frame-pixel-height))
      ;; TODO: minibuffer-parameter can also be a window or a frame; Add 
conditions framep and windowp
@@ -552,7 +552,7 @@ Conditions are:
          (prefix-items-len (and icomplete-hide-common-prefix prefix-len))
          (line-height (line-pixel-height))
          ;; Height is calculated in pixels to avoid issues with some fonts.
-         (prospects-max-height (icomplete--vertical-get-max-height 
line-height))
+         (prospects-max-height (icomplete--vertical-get-max-height))
          ;; prompt + row new line around match
          (prospects-rows-pixel (* (1+ (cl-count ?\n icomplete--match-braket)) 
line-height))
          limit prospects comp)



reply via email to

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