summaryrefslogtreecommitdiff
path: root/lisp/pcomplete.el
diff options
context:
space:
mode:
authorNoam Postavsky <npostavs@gmail.com>2017-11-05 11:36:20 -0500
committerNoam Postavsky <npostavs@gmail.com>2017-11-05 11:36:20 -0500
commit5d744e032fee9ce60446a3cc0cf7c2e681ace465 (patch)
tree6c910755f7ed4834f44f70f1d5ba6f58068f57d2 /lisp/pcomplete.el
parentec6cf35c5fa0842383a492500107314e6d39702c (diff)
downloademacs-5d744e032fee9ce60446a3cc0cf7c2e681ace465.tar.gz
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.
Diffstat (limited to 'lisp/pcomplete.el')
-rw-r--r--lisp/pcomplete.el2
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'."
(setq c (cdr c)))
(setq pcomplete-stub (substring common-stub 0 len)
pcomplete-autolist t)
- (when (and begin (not pcomplete-show-list))
+ (when (and begin (> len 0) (not pcomplete-show-list))
(delete-region begin (point))
(pcomplete-insert-entry "" pcomplete-stub))
(throw 'pcomplete-completions completions))