summaryrefslogtreecommitdiff
path: root/lisp/minibuffer.el
diff options
context:
space:
mode:
authorDaniel Colascione <dancol@dancol.org>2014-04-01 13:48:02 -0700
committerDaniel Colascione <dancol@dancol.org>2014-04-01 13:48:02 -0700
commit2395f2b919f44cae22b2ca99cd779e69d79f710a (patch)
tree16cc8395d5fed77c612e03bee3607eed256cdbe8 /lisp/minibuffer.el
parent8ec49c53c67cfaee550f275c1a8b68d65b9b606f (diff)
downloademacs-2395f2b919f44cae22b2ca99cd779e69d79f710a.tar.gz
Prevent assertion failure when trying to complete the prompt
Diffstat (limited to 'lisp/minibuffer.el')
-rw-r--r--lisp/minibuffer.el7
1 files changed, 4 insertions, 3 deletions
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index bbb7114610d..8e84a2fd307 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1092,9 +1092,10 @@ If no characters can be completed, display a list of possible completions.
If you repeat this command after it displayed such a list,
scroll the window of possible completions."
(interactive)
- (completion-in-region (minibuffer-prompt-end) (point-max)
- minibuffer-completion-table
- minibuffer-completion-predicate))
+ (when (<= (minibuffer-prompt-end) (point))
+ (completion-in-region (minibuffer-prompt-end) (point-max)
+ minibuffer-completion-table
+ minibuffer-completion-predicate)))
(defun completion--in-region-1 (beg end)
;; If the previous command was not this,