changeset 63985:0dc94b891de0

(crm-find-current-element) (crm-minibuffer-complete-and-exit): Handle minibuffer prompt.
author Juri Linkov <juri@jurta.org>
date Mon, 04 Jul 2005 01:04:32 +0000
parents 37ff9b4c3659
children 8d2417e75fe5
files lisp/emacs-lisp/crm.el
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/crm.el	Mon Jul 04 01:03:23 2005 +0000
+++ b/lisp/emacs-lisp/crm.el	Mon Jul 04 01:04:32 2005 +0000
@@ -214,7 +214,7 @@
       (progn
 	;;
 	(setq crm-beginning-of-element (match-beginning 1))
-	(setq crm-end-of-element end-index)
+	(setq crm-end-of-element (+ end-index prompt-end))
 	;; string to the left of the current element
 	(setq crm-left-of-element
 	      (substring target-string 0 (match-beginning 1)))
@@ -482,7 +482,7 @@
       (setq result
 	    (catch 'crm-exit
 
-	      (if (eq (point-min) (point-max))
+	      (if (eq (minibuffer-prompt-end) (point-max))
 		  (throw 'crm-exit t))
 
 	      ;; TODO: this test is suspect?
@@ -508,7 +508,8 @@
 	  nil
 	(if (equal result "check")
 	    (let ((check-strings
-		   (crm-strings-completed-p (buffer-string))))
+		   (crm-strings-completed-p
+		    (buffer-substring (minibuffer-prompt-end) (point-max)))))
 	      ;; check all of minibuffer
 	      (if (eq check-strings t)
 		  (throw 'exit nil)