branch: externals/corfu commit 2af93706c123cb0361ea0111eb8e70eeb3c959df Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
Redisplay hack --- corfu.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/corfu.el b/corfu.el index 6ee52eb147..e73413dcc5 100644 --- a/corfu.el +++ b/corfu.el @@ -424,7 +424,10 @@ The completion backend can override this with (make-frame-invisible corfu--frame)) (set-frame-position corfu--frame x y) (set-frame-size corfu--frame width height t) - (make-frame-visible corfu--frame))) + (make-frame-visible corfu--frame) + ;; HACK: Force redisplay, otherwise the popup somtimes + ;; does not display content. + (redisplay))) (defun corfu--popup-show (pos off width lines &optional curr lo bar) "Show LINES as popup at POS - OFF. @@ -1099,9 +1102,11 @@ there hasn't been any input, then quit." (setq corfu--auto-timer nil) (when (and (not completion-in-region-mode) (eq (current-buffer) buffer)) - (pcase (while-no-input ;; Interruptible capf query - (run-hook-wrapped 'completion-at-point-functions #'corfu--capf-wrapper)) + (pcase + (while-no-input ;; Interruptible capf query + (run-hook-wrapped 'completion-at-point-functions #'corfu--capf-wrapper)) ((and `(,fun ,beg ,end ,table . ,plist) + (guard (message "XXXGOT RETURN %S %S %S" beg end (plist-get plist :company-prefix-length))) (guard (integer-or-marker-p beg)) (guard (<= beg (point) end)) (guard