aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSpencer Baugh2024-10-29 12:16:31 -0400
committerStefan Monnier2024-11-14 10:46:44 -0500
commit5b19ca56f1d91a65c0068160790e2cb512bb2067 (patch)
treeed4df1c97ba5435acc0a55e62bd22492b453f4da /src
parent32f070fa3dfccd29abad6e7566ed9121e3f1da39 (diff)
downloademacs-5b19ca56f1d91a65c0068160790e2cb512bb2067.tar.gz
emacs-5b19ca56f1d91a65c0068160790e2cb512bb2067.zip
Preserve selected candidate across *Completions* update
When *Completions* is updated and point was on some completion candidate, move point to the same candidate after the update. Also, a selected completion in *Completions* is now always highlighted, even if it was selected by the user or other code moving point rather than by minibuffer-next-completion, because cursor-face-highlight-nonselected-window is now set in completion-setup-function. Other completion UIs (e.g. ido, vertico, etc) effectively have this behavior: whenever they update the list of completions, they preserve whatever candidate is selected. This matters a lot when completions are auto-updated, but is still useful without auto-updating. Including this behavior is a step towards supporting auto-updating in the default completion UI. * lisp/minibuffer.el (minibuffer-completion-help): Preserve the selected completion candidate across updates. (bug#74019) (minibuffer-hide-completions): Move point to BOB. (minibuffer-next-completion): Don't set cursor-face-highlight-nonselected-window. * lisp/simple.el (completions--start-of-candidate-at) (choose-completion): Extract the current-completion-finding code into a separate function. (completion-setup-function): Set cursor-face-highlight-nonselected-window. * etc/NEWS: Announce new behavior.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions