[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu d6f63b0 3/4: Avoid display artifact at first star
From: |
Protesilaos Stavrou |
Subject: |
[elpa] externals/corfu d6f63b0 3/4: Avoid display artifact at first start |
Date: |
Wed, 28 Apr 2021 15:20:38 -0400 (EDT) |
branch: externals/corfu
commit d6f63b08e7b0068434a29740b35482b5be5386a3
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Avoid display artifact at first start
---
corfu.el | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/corfu.el b/corfu.el
index 81e3337..ce63ca3 100644
--- a/corfu.el
+++ b/corfu.el
@@ -193,7 +193,8 @@ Set to nil in order to disable confirmation."
fringes-outside-margins 0)
(let (inhibit-modification-hooks)
(erase-buffer)
- (insert content)))
+ (insert content)
+ (goto-char (point-min))))
(unless (and (frame-live-p corfu--frame)
(eq (frame-parent corfu--frame) (window-frame)))
(when corfu--frame
@@ -632,7 +633,10 @@ Set to nil in order to disable confirmation."
(remove-hook 'pre-command-hook #'corfu--pre-command-hook 'local)
(remove-hook 'post-command-hook #'corfu--post-command-hook 'local)
(when corfu--overlay (delete-overlay corfu--overlay))
- (when (frame-live-p corfu--frame) (make-frame-invisible corfu--frame))
+ (when (frame-live-p corfu--frame)
+ (make-frame-invisible corfu--frame)
+ (with-current-buffer (window-buffer (frame-root-window corfu--frame))
+ (erase-buffer)))
(mapc #'kill-local-variable corfu--state-vars))
(defun corfu--mode-hook ()