diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2022-11-20 12:46:24 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2022-11-20 12:46:24 +0100 |
| commit | 4bd40f82f112f6ad510cd3f81afe2f0db4fa2fa0 (patch) | |
| tree | ed1b28370fc7346e1db6f645d0758039fe46d168 /extensions | |
| parent | fde6bb33476f12fab7328fa78d919a55440f91ba (diff) | |
corfu-popupinfo: Work around yet another Emacs quirk
Diffstat (limited to 'extensions')
| -rw-r--r-- | extensions/corfu-popupinfo.el | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el index c08ab30..3890f45 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." |
