mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2025-01-17 17:58:46 +00:00
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
@ -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…
Reference in New Issue
Block a user