diff options
author | Philipp Stephani <phst@google.com> | 2021-04-23 12:52:51 +0200 |
---|---|---|
committer | Philipp Stephani <phst@google.com> | 2021-04-23 12:52:51 +0200 |
commit | 3806d2168bdc36796d2dfac5f743582f0ce71c72 (patch) | |
tree | 9f6e92bfeb0774addb2572cc6ca4a1dde2751fdd /lisp | |
parent | 804f5acda4bd947f058c6843e373797202314467 (diff) | |
download | emacs-3806d2168bdc36796d2dfac5f743582f0ce71c72.tar.gz emacs-3806d2168bdc36796d2dfac5f743582f0ce71c72.tar.bz2 emacs-3806d2168bdc36796d2dfac5f743582f0ce71c72.zip |
Fix small bug in 'completion-table-subvert'.
Even for a trivial underlying completion table (where the 'boundaries'
action returns nil), we need to provide nontrivial boundaries so that
they match the behavior of 'all-completions'.
* lisp/minibuffer.el (completion-table-subvert): Return boundaries
even for trivial underlying completion table.
* test/lisp/minibuffer-tests.el (completion-table-subvert-test):
Amend unit test to also test boundaries. While there, also test
the other completion functions.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/minibuffer.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index 7da3c39e6b9..51e0519d489 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -271,7 +271,7 @@ the form (concat S2 S)." (let* ((str (if (string-prefix-p s1 string completion-ignore-case) (concat s2 (substring string (length s1))))) (res (if str (complete-with-action action table str pred)))) - (when res + (when (or res (eq (car-safe action) 'boundaries)) (cond ((eq (car-safe action) 'boundaries) (let ((beg (or (and (eq (car-safe res) 'boundaries) (cadr res)) 0))) |