]> git.eshelyaron.com Git - emacs.git/commitdiff
; Fix updating completion preview after deletion at eob
authorEshel Yaron <me@eshelyaron.com>
Fri, 2 Feb 2024 12:33:43 +0000 (13:33 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 2 Feb 2024 12:33:43 +0000 (13:33 +0100)
* lisp/completion-preview.el (completion-preview--show): Use the
actual overlay position, instead of its 'completion-preview-end'
property, in case the overlay has moved (e.g. when called after a
deletion command).

lisp/completion-preview.el

index d7d3e9bf9f7dbe7ef6a933fa8b5449bcc7f3d1c1..e827da43a08d87fc9770baff841f800bbb3d2932 100644 (file)
@@ -302,7 +302,7 @@ point, otherwise hide it."
     ;; never display a stale preview and that the preview doesn't
     ;; flicker, even with slow completion backends.
     (let* ((beg (completion-preview--get 'completion-preview-beg))
-           (end (max (point) (completion-preview--get 'completion-preview-end)))
+           (end (max (point) (overlay-start completion-preview--overlay)))
            (cands (completion-preview--get 'completion-preview-cands))
            (index (completion-preview--get 'completion-preview-index))
            (cand (nth index cands))