From: Eshel Yaron Date: Fri, 2 Feb 2024 12:33:43 +0000 (+0100) Subject: ; Fix updating completion preview after deletion at eob X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c44782c5509910f7255be644b458fe283c3546c8;p=emacs.git ; Fix updating completion preview after deletion at eob * 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). --- diff --git a/lisp/completion-preview.el b/lisp/completion-preview.el index d7d3e9bf9f7..e827da43a08 100644 --- a/lisp/completion-preview.el +++ b/lisp/completion-preview.el @@ -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))