]> git.eshelyaron.com Git - emacs.git/commit
; Fix mid-symbol updating/cycling completion preview
authorEshel Yaron <me@eshelyaron.com>
Thu, 1 Feb 2024 11:30:24 +0000 (12:30 +0100)
committerEshel Yaron <me@eshelyaron.com>
Thu, 1 Feb 2024 16:58:20 +0000 (17:58 +0100)
commite64361b0fbd78bb48b859658f9d0c1bb36916f50
tree3568562ef84df1d54c9f7ace070abe5a08fb0f14
parent1f39f91adc9883e66191457789577173639b7d69
; Fix mid-symbol updating/cycling completion preview

This fixes an issue where 'completion-preview-next-candidate' would
fail to take into account the part of the symbol that follows
point (the suffix) when point is at the middle of a symbol, as well as
a similar issue in 'completion-preview--show' that would manifest with
slow 'completion-at-point-functions'.

* lisp/completion-preview.el (completion-preview-next-candidate)
(completion-preview--show): Use recorded 'completion-preview-end'
position instead of current point.

* test/lisp/completion-preview-tests.el (completion-preview-mid-symbol-cycle):
New test.
lisp/completion-preview.el
test/lisp/completion-preview-tests.el