Make comint-watch-for-password-prompt more resilient
* lisp/comint.el (comint-watch-for-password-prompt): Don't try to send commands to the process after it's exited (bug#56336). (This commonly happens when invoked via `M-&'.)
This commit is contained in:
parent
8d68760dde
commit
5b112482fb
1 changed files with 3 additions and 2 deletions
|
@ -2515,8 +2515,9 @@ This function could be in the list `comint-output-filter-functions'."
|
|||
(1+ comint--prompt-recursion-depth)))
|
||||
(if (> comint--prompt-recursion-depth 10)
|
||||
(message "Password prompt recursion too deep")
|
||||
(comint-send-invisible
|
||||
(string-trim string "[ \n\r\t\v\f\b\a]+" "\n+"))))))
|
||||
(when (get-buffer-process (current-buffer))
|
||||
(comint-send-invisible
|
||||
(string-trim string "[ \n\r\t\v\f\b\a]+" "\n+")))))))
|
||||
(current-buffer))))
|
||||
|
||||
;; Low-level process communication
|
||||
|
|
Loading…
Add table
Reference in a new issue