[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu-doc f83307a233 09/95: Update doc frame when corfu
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu-doc f83307a233 09/95: Update doc frame when corfu frame coordinates changed |
Date: |
Tue, 19 Jul 2022 15:58:00 -0400 (EDT) |
branch: externals/corfu-doc
commit f83307a233ee4028a11121c61aef6a5889a31587
Author: Yuwei Tian <ibluefocus@outlook.com>
Commit: Yuwei Tian <ibluefocus@outlook.com>
Update doc frame when corfu frame coordinates changed
---
corfu-doc.el | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/corfu-doc.el b/corfu-doc.el
index 27ee83f984..0436a1eb65 100644
--- a/corfu-doc.el
+++ b/corfu-doc.el
@@ -82,6 +82,9 @@
(defvar-local corfu-doc--candidate nil
"Completion candidate to show doc for.")
+(defvar-local corfu-doc--cf-frame-edges nil
+ "Coordinates of the corfu frame's edges.")
+
;; Function adapted from corfu.el by Daniel Mendler
(defun corfu-doc--redirect-focus ()
"Redirect focus from doc."
@@ -242,12 +245,14 @@
(defun corfu-doc--show ()
(let ((candidate (and (> corfu--total 0)
- (nth corfu--index corfu--candidates))))
+ (nth corfu--index corfu--candidates)))
+ (cf-frame-edges (frame-edges corfu--frame 'inner)))
(if candidate
- (when-let* ((corfu-on (and (fboundp 'corfu-mode) corfu-mode))
- (f-v-p (frame-visible-p corfu--frame)))
+ (when (and (and (fboundp 'corfu-mode) corfu-mode)
+ (frame-visible-p corfu--frame))
(unless (and (string= corfu-doc--candidate candidate)
(frame-visible-p corfu-doc--frame)
+ (equal cf-frame-edges corfu-doc--cf-frame-edges)
(eq (selected-window) corfu-doc--window))
;; show doc frame
(when-let* ((doc (ignore-errors (corfu-doc-fetch-documentation))))
@@ -255,6 +260,7 @@
,@(corfu-doc--calculate-doc-frame-position) ,doc)))))
(corfu-doc--hide))
(setq corfu-doc--candidate candidate)
+ (setq corfu-doc--cf-frame-edges cf-frame-edges)
(setq corfu-doc--window (selected-window))))
(defun corfu-doc--hide ()
- [elpa] externals/corfu-doc 8e463cccad 11/95: Fix #4: add requirement for map library, (continued)
- [elpa] externals/corfu-doc 8e463cccad 11/95: Fix #4: add requirement for map library, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc b8b47f79bc 03/95: Make the documentation scrollable, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc d2260b04d7 04/95: Fix doc frame border missing problem, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc fd15093639 05/95: Add left and right margins, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc c6b54c923e 14/95: Add command to quickly toggle documentation popup on or off, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 98398c61fa 15/95: Fix wrong argument type error when calling frame-visible-p, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc e18aea61e7 10/95: Version 0.0.3, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 98509cbe29 44/95: Decrease auto delay to 0.1, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 0741012875 26/95: Fix typo in comment, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 8c30a44d67 41/95: Fix #7: change the behavior of the corfu-doc-toggle command, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc f83307a233 09/95: Update doc frame when corfu frame coordinates changed,
ELPA Syncer <=
- [elpa] externals/corfu-doc 488da67753 13/95: Revert previous commit, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc ef1edadb4f 29/95: README: Document `corfu-doc-delay`, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 5d08342a82 28/95: Fix #6: do not show the documentation popup immediately, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc d051b8e0b1 23/95: Place doc frame at top or bottom of the completion popup frame, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 7926ff406c 47/95: Avoid using map-merge, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc a8835a6540 43/95: Version 0.4.0, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 75faa58328 21/95: Version 0.0.5, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc d7d7c27703 70/95: Version 0.6.2, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc d5224ad109 30/95: Decrease popup displaying delay to 0.2 seconds, ELPA Syncer, 2022/07/19
- [elpa] externals/corfu-doc 4ff6f35c18 64/95: Fix #12: make the popup functions more overrideable, ELPA Syncer, 2022/07/19