[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/corfu 4bd40f82f1: corfu-popupinfo: Work around yet anot
From: |
ELPA Syncer |
Subject: |
[elpa] externals/corfu 4bd40f82f1: corfu-popupinfo: Work around yet another Emacs quirk |
Date: |
Sun, 20 Nov 2022 06:57:26 -0500 (EST) |
branch: externals/corfu
commit 4bd40f82f112f6ad510cd3f81afe2f0db4fa2fa0
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
corfu-popupinfo: Work around yet another Emacs quirk
---
extensions/corfu-popupinfo.el | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index c08ab30669..3890f45dd6 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -356,14 +356,22 @@ the candidate popup, its value is 'bottom, 'top, 'right
or 'left."
(and (not doc-changed)
(- (frame-pixel-width corfu-popupinfo--frame)
border border))
(and (not doc-changed)
- (- (frame-pixel-height corfu-popupinfo--frame)
border border)))))
+ (- (frame-pixel-height corfu-popupinfo--frame)
border border))))
+ (margin-quirk (not corfu-popupinfo--frame)))
(setq corfu-popupinfo--frame
(corfu--make-frame corfu-popupinfo--frame
area-x area-y area-w area-h
" *corfu-popupinfo*")
corfu-popupinfo--direction area-d
corfu-popupinfo--candidate candidate
- corfu-popupinfo--coordinates new-coords))))))
+ corfu-popupinfo--coordinates new-coords)
+ ;; HACK: Force margin update. For some reason, the call to
+ ;; `set-window-buffer' in `corfu--make-frame' is not effective the
+ ;; first time. Why does Emacs have all these quirks?
+ (when margin-quirk
+ (set-window-buffer
+ (frame-root-window corfu-popupinfo--frame)
+ " *corfu-popupinfo*")))))))
(defun corfu-popupinfo--hide ()
"Clear the info popup buffer content and hide it."
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/corfu 4bd40f82f1: corfu-popupinfo: Work around yet another Emacs quirk,
ELPA Syncer <=