Fix password prompt in comint (don't merge)

* lisp/comint.el (comint-watch-for-password-prompt): Use whole
string for setting the prompt.  (Bug#74626)
This commit is contained in:
Michael Albinus 2024-12-02 19:21:54 +01:00
parent f65de1019d
commit e618d5ae94

View file

@ -2573,8 +2573,7 @@ This function could be in the list `comint-output-filter-functions'."
(when (let ((case-fold-search t))
(string-match comint-password-prompt-regexp
(string-replace "\r" "" string)))
(setq prompt (string-trim (match-string 0 string)
"[ \n\r\t\v\f\b\a]+" "\n+"))
(setq prompt (string-trim string "[ \n\r\t\v\f\b\a]+" "\n+"))
;; Use `run-at-time' in order not to pause execution of the
;; process filter with a minibuffer
(run-at-time