Fix navigating vertical completions with annotations (bug#81645)

* lisp/simple.el (last-completion): When finding the last column
in the completions list, account for annotations on the candidate.
This commit is contained in:
Stephen Berman 2026-08-23 15:59:21 +02:00
parent f60d4243e6
commit b4612c6f29

View file

@ -10176,8 +10176,11 @@ the completions is popped up and down."
(last-col (progn
(first-completion)
(goto-char (pos-eol))
(goto-char (previous-single-property-change
(point) 'mouse-face))
;; Go to the beginning of the candidate. We loop
;; to move past any completion annotations.
(while (not (get-text-property (point) 'mouse-face))
(goto-char
(previous-single-property-change (point) 'mouse-face)))
(current-column))))
(if (zerop last-col)
;; If there is only one column of completions, the last