summaryrefslogtreecommitdiff
path: root/extensions/corfu-popupinfo.el
diff options
context:
space:
mode:
authorDaniel Mendler <mail@daniel-mendler.de>2024-01-03 15:01:08 +0100
committerDaniel Mendler <mail@daniel-mendler.de>2024-01-03 15:01:56 +0100
commitadfccae7be2dff68ecbded1b47d5029e4e86dc00 (patch)
tree96ad428ef99cd8a04f7029b7b3fbc15843188c7c /extensions/corfu-popupinfo.el
parent61a20a50369de2cae77d649269d3c047fbbc27ec (diff)
Store extra properties in completion-in-region--data
Diffstat (limited to 'extensions/corfu-popupinfo.el')
-rw-r--r--extensions/corfu-popupinfo.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/extensions/corfu-popupinfo.el b/extensions/corfu-popupinfo.el
index 2b8b2d6..3aa4f55 100644
--- a/extensions/corfu-popupinfo.el
+++ b/extensions/corfu-popupinfo.el
@@ -179,7 +179,8 @@ all values are in pixels relative to the origin. See
(let ((old-buffers (buffer-list)) (buffer nil))
(unwind-protect
(when-let
- ((fun (plist-get corfu--extra :company-location))
+ ((extra (nth 4 completion-in-region--data))
+ (fun (plist-get extra :company-location))
;; BUG: company-location may throw errors if location is not found
(loc (ignore-errors (funcall fun candidate)))
((setq buffer
@@ -214,7 +215,8 @@ all values are in pixels relative to the origin. See
(defun corfu-popupinfo--get-documentation (candidate)
"Get the documentation for CANDIDATE."
- (when-let ((fun (plist-get corfu--extra :company-doc-buffer))
+ (when-let ((extra (nth 4 completion-in-region--data))
+ (fun (plist-get extra :company-doc-buffer))
(res (save-excursion
(let ((inhibit-message t)
(message-log-max nil)