summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2022-11-17 21:11:17 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2022-11-17 21:11:17 +0100
commit86f641a7cb44e0d91f9f46a9799872719bb46af7 (patch)
treec14f0c5bdd9755fce8c111c19c4e88a6991b67d5
parentf92c4c3fa42c8f721371c3c2fb975bdbf0c57249 (diff)
corfu-doc-popup: Use corfu--hide-frame
-rw-r--r--extensions/corfu-doc-popup.el12
1 files changed, 2 insertions, 10 deletions
diff --git a/extensions/corfu-doc-popup.el b/extensions/corfu-doc-popup.el
index e2dc603..7d9278d 100644
--- a/extensions/corfu-doc-popup.el
+++ b/extensions/corfu-doc-popup.el
@@ -387,15 +387,7 @@ it should be compared with the value recorded by `corfu--index'."
(defun corfu-doc-popup--hide ()
"Clear the doc popup buffer content and hide it."
- (when (frame-live-p corfu-doc-popup--frame)
- (make-frame-invisible corfu-doc-popup--frame)
- (corfu-doc-popup--clear-buffer)))
-
-(defun corfu-doc-popup--clear-buffer ()
- "Clear the doc popup buffer content."
- (with-current-buffer (get-buffer " *corfu-doc-popup*")
- (let ((inhibit-read-only t))
- (erase-buffer))))
+ (corfu--hide-frame corfu-doc-popup--frame))
(defun corfu-doc-popup--transition ()
"Transition when updating the doc popup."
@@ -403,7 +395,7 @@ it should be compared with the value recorded by `corfu--index'."
(when (and (not (null corfu-doc-popup-delay))
(> corfu-doc-popup-delay 0))
(if corfu-doc-popup-hide
- (make-frame-invisible corfu-doc-popup--frame)
+ (corfu--hide-frame corfu-doc-popup--frame)
(corfu-doc-popup--show corfu-doc-popup--candidate)))))
(defun corfu-doc-popup-scroll-up (&optional n)