diff options
Diffstat (limited to 'lisp/comint.el')
-rw-r--r-- | lisp/comint.el | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lisp/comint.el b/lisp/comint.el index 092902d865e..b4ea232767c 100644 --- a/lisp/comint.el +++ b/lisp/comint.el @@ -2423,11 +2423,13 @@ Security bug: your string can still be temporarily recovered with (defun comint-watch-for-password-prompt (string) "Prompt in the minibuffer for password and send without echoing. Looks for a match to `comint-password-prompt-regexp' in order -to detect the need to (prompt and) send a password. +to detect the need to (prompt and) send a password. Ignores any +carriage returns (\\r) in STRING. This function could be in the list `comint-output-filter-functions'." (when (let ((case-fold-search t)) - (string-match comint-password-prompt-regexp string)) + (string-match comint-password-prompt-regexp + (replace-regexp-in-string "\r" "" string))) (when (string-match "^[ \n\r\t\v\f\b\a]+" string) (setq string (replace-match "" t t string))) (let ((comint--prompt-recursion-depth (1+ comint--prompt-recursion-depth))) @@ -3450,7 +3452,7 @@ the completions." (eq (window-buffer (posn-window (event-start first))) (get-buffer "*Completions*")) (memq (key-binding key) - '(mouse-choose-completion choose-completion)))) + '(choose-completion)))) ;; If the user does choose-completion with the mouse, ;; execute the command, then delete the completion window. (progn |