]> git.eshelyaron.com Git - completion-preview.git/commitdiff
Fix handling of non-zero completion base value
authorEshel Yaron <me@eshelyaron.com>
Thu, 2 Nov 2023 21:56:02 +0000 (22:56 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 2 Nov 2023 21:56:02 +0000 (22:56 +0100)
completion-preview.el

index 9f266537d65a44425bfeaab20aba6fc5f7e88c04..683d59f256fc19400991036d62025e1a2116871f 100644 (file)
@@ -139,7 +139,8 @@ Compatibility definition for `minibuffer--sort-by-length-alpha'."
                    (setq completion-preview--overlay (make-overlay end end))
                    (overlay-put completion-preview--overlay 'after-string after)
                    (overlay-put completion-preview--overlay 'completion-preview-data
-                                (list beg end (list cand) :exit-function exit-fn))
+                                (list (+ beg base) end (list cand)
+                                      :exit-function exit-fn))
                    (completion-preview-active-mode)))))))))))
 
 (defun completion-preview--post-command ()