diff options
| author | Noam Postavsky | 2017-11-05 11:36:20 -0500 |
|---|---|---|
| committer | Noam Postavsky | 2017-11-05 11:36:20 -0500 |
| commit | 5d744e032fee9ce60446a3cc0cf7c2e681ace465 (patch) | |
| tree | 6c910755f7ed4834f44f70f1d5ba6f58068f57d2 | |
| parent | ec6cf35c5fa0842383a492500107314e6d39702c (diff) | |
| download | emacs-5d744e032fee9ce60446a3cc0cf7c2e681ace465.tar.gz emacs-5d744e032fee9ce60446a3cc0cf7c2e681ace465.zip | |
Don't replace user input when completion prefix is empty (Bug#18951)
* lisp/pcomplete.el (pcomplete-parse-arguments): Only replace user
input if we produced a non-empty common completion stub.
| -rw-r--r-- | lisp/pcomplete.el | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lisp/pcomplete.el b/lisp/pcomplete.el index 745a813b758..2d2a8773bfe 100644 --- a/lisp/pcomplete.el +++ b/lisp/pcomplete.el | |||
| @@ -772,7 +772,7 @@ this is `comint-dynamic-complete-functions'." | |||
| 772 | (setq c (cdr c))) | 772 | (setq c (cdr c))) |
| 773 | (setq pcomplete-stub (substring common-stub 0 len) | 773 | (setq pcomplete-stub (substring common-stub 0 len) |
| 774 | pcomplete-autolist t) | 774 | pcomplete-autolist t) |
| 775 | (when (and begin (not pcomplete-show-list)) | 775 | (when (and begin (> len 0) (not pcomplete-show-list)) |
| 776 | (delete-region begin (point)) | 776 | (delete-region begin (point)) |
| 777 | (pcomplete-insert-entry "" pcomplete-stub)) | 777 | (pcomplete-insert-entry "" pcomplete-stub)) |
| 778 | (throw 'pcomplete-completions completions)) | 778 | (throw 'pcomplete-completions completions)) |