diff options
| author | Daniel Mendler <mail@daniel-mendler.de> | 2022-02-06 17:08:23 +0100 |
|---|---|---|
| committer | Daniel Mendler <mail@daniel-mendler.de> | 2022-02-06 17:08:23 +0100 |
| commit | 533b3b93b27eb3b7aad504de48312f6c22ee20aa (patch) | |
| tree | 5d2e86fa5a2ef691aca78a9653f1b7ad3ae6c321 | |
| parent | 0e84ebc579936ebcf34e8f87b619ad7207c9cc3b (diff) | |
Yet another try to force redisplay
| -rw-r--r-- | corfu.el | 15 |
1 files changed, 11 insertions, 4 deletions
@@ -430,7 +430,16 @@ The completion backend can override this with ;; XXX HACK: Force redisplay, otherwise the popup sometimes does not display content. (set-frame-position corfu--frame x y) (redisplay) - (make-frame-visible corfu--frame)))) + (make-frame-visible corfu--frame)) + ;; XXX HACK: Force redisplay, otherwise the popup sometimes does not display content. + (run-at-time 0.01 nil + (lambda () + (with-current-buffer buffer + (let ((inhibit-read-only t)) + (goto-char (point-min)) + (insert "please redisplay") + (delete-region (point-min) (point)))) + (redisplay))))) (defun corfu--popup-show (pos off width lines &optional curr lo bar) "Show LINES as popup at POS - OFF. @@ -808,9 +817,7 @@ there hasn't been any input, then quit." (corfu--candidates (corfu--candidates-popup beg) (corfu--echo-documentation) - (corfu--preview-current beg end str) - ;; XXX HACK: Force redisplay, otherwise the popup sometimes does not display content. - (run-at-time 0.01 nil #'redisplay)) + (corfu--preview-current beg end str)) ;; 4) There are no candidates & corfu-quit-no-match => Confirmation popup ((not (or corfu--candidates ;; When `corfu-quit-no-match' is a number of seconds and the auto completion wasn't |
