emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master aef1242 118/399: ivy-overlay.el (ivy-overlay-impossible-p)


From: Oleh Krehel
Subject: [elpa] master aef1242 118/399: ivy-overlay.el (ivy-overlay-impossible-p): Simplify
Date: Sat, 20 Jul 2019 14:57:03 -0400 (EDT)

branch: master
commit aef1242b86aaffc9bab4a7c553ce9d003e754f53
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>

    ivy-overlay.el (ivy-overlay-impossible-p): Simplify
    
    Avoid situation where `ivy-overlay-impossible-p' changes value as the
    user types new input. The overlay will fit anyway because of
    `ivy--trucate-string'.
---
 ivy-overlay.el | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/ivy-overlay.el b/ivy-overlay.el
index 5a2e5e7..1d4305c 100644
--- a/ivy-overlay.el
+++ b/ivy-overlay.el
@@ -88,16 +88,14 @@ Then attach the overlay to the character before point."
 (declare-function ivy-state-window "ivy")
 (declare-function ivy--remove-prefix "ivy")
 
-(defun ivy-overlay-impossible-p (str)
+(defun ivy-overlay-impossible-p (_str)
   (or
    (and (eq major-mode 'org-mode)
         (plist-get (text-properties-at (point)) 'src-block))
    (<= (window-height) (+ ivy-height 3))
    (= (point) (point-min))
    (< (- (+ (window-width) (window-hscroll)) (current-column))
-      (apply #'max
-             (mapcar #'string-width
-                     (split-string str "\n"))))))
+      30)))
 
 (defun ivy-display-function-overlay (str)
   "Called from the minibuffer, display STR in an overlay in Ivy window.



reply via email to

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