branch: master
commit 1e96d20c46bf0a9d73cd5c2c05747b69cd98ce36
Author: Oleh Krehel <[email protected]>
Commit: Oleh Krehel <[email protected]>

    ivy-overlay.el (ivy-display-function-overlay): Fix up
    
    Avoid bug at (bobp).
---
 ivy-overlay.el | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/ivy-overlay.el b/ivy-overlay.el
index 1156b79..1e97899 100644
--- a/ivy-overlay.el
+++ b/ivy-overlay.el
@@ -81,8 +81,11 @@ Hide the minibuffer contents and cursor."
       (setq cursor-type nil)
       (let ((overlay-str
              (concat
-              (buffer-substring (1- (point)) (point))
+              (buffer-substring (max 1 (1- (point))) (point))
               ivy-text
+              (if (eolp)
+                  " "
+                "")
               (buffer-substring (point) (line-end-position))
               (ivy-left-pad
                str

Reply via email to