]> code.delx.au - gnu-emacs/blobdiff - lisp/simple.el
Avoid having `C-x h' mark the prompt part of the minibuffer
[gnu-emacs] / lisp / simple.el
index 971f60067324800c71215e3d36e985ad847a7ba7..7573789ad5c509acce3a2e6198947052bcff65d5 100644 (file)
@@ -1075,7 +1075,9 @@ that uses or sets the mark."
   (interactive)
   (push-mark (point))
   (push-mark (point-max) nil t)
-  (goto-char (point-min)))
+  ;; This is really `point-min' in most cases, but if we're in the
+  ;; minibuffer, this is at the end of the prompt.
+  (goto-char (minibuffer-prompt-end)))
 \f
 
 ;; Counting lines, one way or another.