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

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

[elpa] master f357cd2 198/348: ivy-overlay.el (ivy-overlay-cleanup): Res


From: Oleh Krehel
Subject: [elpa] master f357cd2 198/348: ivy-overlay.el (ivy-overlay-cleanup): Restore cursor-type
Date: Sat, 8 Apr 2017 11:03:55 -0400 (EDT)

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

    ivy-overlay.el (ivy-overlay-cleanup): Restore cursor-type
---
 ivy-overlay.el | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ivy-overlay.el b/ivy-overlay.el
index 8ed753b..a4eae2e 100644
--- a/ivy-overlay.el
+++ b/ivy-overlay.el
@@ -31,6 +31,8 @@
   "Cursor face for inline completion."
   :group 'ivy-faces)
 
+(defvar ivy--old-cursor-type t)
+
 (defvar ivy-overlay-at nil
   "Overlay variable for `ivy-display-function-overlay'.")
 
@@ -46,7 +48,7 @@
   (when (overlayp ivy-overlay-at)
     (delete-overlay ivy-overlay-at)
     (setq ivy-overlay-at nil))
-  (setq cursor-type t))
+  (setq cursor-type ivy--old-cursor-type))
 
 (defun ivy-overlay-show-after (str)
   "Display STR in an overlay at point.
@@ -70,6 +72,8 @@ Hide the minibuffer contents and cursor."
   (let ((cursor-pos (1+ (- (point) (minibuffer-prompt-end)))))
     (setq cursor-type nil)
     (with-ivy-window
+      (when cursor-type
+        (setq ivy--old-cursor-type cursor-type))
       (setq cursor-type nil)
       (let ((overlay-str
              (concat



reply via email to

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