Make sure Comint minibuffer password prompts end with space
* lisp/comint.el (comint-watch-for-password-prompt): Add a trailing space character to the minibuffer password prompt, if it does not contain one already, per the minibuffer UI conventions. Bug#76604
This commit is contained in:
parent
7e89ef2ced
commit
41c1c6ffac
1 changed files with 8 additions and 2 deletions
|
@ -2601,8 +2601,14 @@ This function could be in the list `comint-output-filter-functions'."
|
|||
prompt)
|
||||
(when (let ((case-fold-search t))
|
||||
(string-match comint-password-prompt-regexp string))
|
||||
(setq prompt (string-trim (match-string 0 string)
|
||||
"[ \n\r\t\v\f\b\a]+" "\n+"))
|
||||
(setq prompt
|
||||
(let ((content (string-trim (match-string 0 string)
|
||||
"[ \n\r\t\v\f\b\a]+" "\n+"))
|
||||
(suffix " "))
|
||||
(concat content
|
||||
(and (not (string-empty-p content))
|
||||
(not (string-suffix-p suffix content))
|
||||
suffix))))
|
||||
;; Use `run-at-time' in order not to pause execution of the
|
||||
;; process filter with a minibuffer
|
||||
(run-at-time
|
||||
|
|
Loading…
Add table
Reference in a new issue