]> git.eshelyaron.com Git - emacs.git/commit
Handle point not at EOB in minibuffer-choose-completion
authorSpencer Baugh <sbaugh@janestreet.com>
Mon, 24 Apr 2023 14:05:24 +0000 (10:05 -0400)
committerJuri Linkov <juri@linkov.net>
Wed, 14 Jun 2023 17:31:34 +0000 (20:31 +0300)
commit9cbd25e5cdd3881a024da8279f42fb8a8115b688
tree70489c3a5c62724f7f6f5dc6e3cf85adeaa9c385
parent4c975111af2163aca8be716ba578d29747c73469
Handle point not at EOB in minibuffer-choose-completion

Without this change, only the minibuffer contents before point are
cleared when a completion is chosen, which results in stray text when
point is in the middle of the minibuffer.

After this change, we heuristically decide either to clear the whole
buffer or only part of it, taking into account the location of point.

* lisp/minibuffer.el (minibuffer-completion-help): Use point when
calculating completion-base-affixes. (Bug#62700)
lisp/minibuffer.el