]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent assertion failure when trying to complete the prompt
authorDaniel Colascione <dancol@dancol.org>
Tue, 1 Apr 2014 20:48:02 +0000 (13:48 -0700)
committerDaniel Colascione <dancol@dancol.org>
Tue, 1 Apr 2014 20:48:02 +0000 (13:48 -0700)
lisp/ChangeLog
lisp/minibuffer.el

index 52a974fa21e2334e49f678e71a0af56fc2250233..dca32ba7011bf726b67460f0a314965795509955 100644 (file)
@@ -1,3 +1,8 @@
+2014-04-01  Daniel Colascione  <dancol@dancol.org>
+
+       * minibuffer.el (minibuffer-complete): Prevent assertion failure
+       when trying to complete the prompt.
+
 2014-03-31  Leo Liu  <sdl.web@gmail.com>
 
        * emacs-lisp/eldoc.el (eldoc-print-current-symbol-info): Refactor
index bbb7114610db49d7902c103013d15c75f907d148..8e84a2fd307ee0379762d6df0184b2030f2970a0 100644 (file)
@@ -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,