diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2024-11-01 11:37:18 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2024-11-01 11:37:18 +0100 |
| commit | 16d5aef839477ac54790fb797c1e85dfdbbd313f (patch) | |
| tree | ffe3e354866ac51dc528f68eb312ae3e4da20862 /extensions | |
| parent | c7e2aa41702c6a38f7253ae9c668c562b56a410a (diff) | |
corfu--make-frame: Remove buffer argument, use current buffer
Diffstat (limited to 'extensions')
| -rw-r--r-- | extensions/corfu-popupinfo.el | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el index b74da2a..1115afb 100644 --- a/extensions/corfu-popupinfo.el +++ b/extensions/corfu-popupinfo.el @@ -376,21 +376,20 @@ form (X Y WIDTH HEIGHT DIR)." (- (frame-pixel-width 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--buffer) - corfu-popupinfo--toggle t - corfu-popupinfo--lock-dir area-d - corfu-popupinfo--candidate candidate - corfu-popupinfo--coordinates new-coords) - ;; XXX 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--buffer))))))) + (with-current-buffer corfu-popupinfo--buffer + (setq corfu-popupinfo--frame + (corfu--make-frame corfu-popupinfo--frame + area-x area-y area-w area-h) + corfu-popupinfo--toggle t + corfu-popupinfo--lock-dir area-d + corfu-popupinfo--candidate candidate + corfu-popupinfo--coordinates new-coords) + ;; XXX 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--buffer)))))))) (defun corfu-popupinfo--hide () "Clear the info popup buffer content and hide it." |
